Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnitTests: eliminate the calls to 'return' in the test scripts #517

Closed
1 of 2 tasks
bschmalhofer opened this issue Oct 6, 2020 · 2 comments
Closed
1 of 2 tasks
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Oct 6, 2020

The test scripts still contain many 'return' calls. These are primarily used for aborting a test script in specific error conditions. These return calls are problematic because:

  1. They mess up the test plan
  2. A script should not be exited with return.

Easy cases can be replace by a skip_all(). Other cases might need a more elaborate logic.

TODO:

  • eliminate return in test scripts
  • check the unit tests
@bschmalhofer bschmalhofer added the bug Something isn't working as intended label Oct 6, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Oct 6, 2020
@bschmalhofer bschmalhofer self-assigned this Oct 6, 2020
@bschmalhofer bschmalhofer changed the title UnitTests: elimnate the return calls in the test scripts UnitTests: eliminate the calls to 'return' in the test scripts Oct 6, 2020
@bschmalhofer bschmalhofer modified the milestones: OTOBO 10.0, OTOBO 10.0.6 Oct 22, 2020
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Oct 22, 2020

Eliminated the questionable return statements. Unittests look mostly fine.

But some errors cropped up in PGP.t It could be that Test2::V0 somehow does a use utf8 for the test script. Needs to be investigated.

bschmalhofer added a commit that referenced this issue Oct 22, 2020
Therefore the garbling must be done with an octett array too.
bschmalhofer added a commit that referenced this issue Oct 22, 2020
Decode it so that we can do the comparison
bschmalhofer added a commit that referenced this issue Oct 22, 2020
@bschmalhofer
Copy link
Contributor Author

After considering the encodings, PGP.t succeeds again. Also some refactoring in PGP.t.
When more inappropriate returns are encountered, then they should be handled in a separate issue.

Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

1 participant