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

detect-engine: convert unittests to FAIL/PASS APIs v1 #6523

Conversation

ghostinthehive
Copy link
Contributor

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4024

Ticket: #4024

Describe changes:

  • Update DetectEngineTest* unittests to use FAIL/PASS APIs

@ghostinthehive ghostinthehive requested a review from a team as a code owner October 27, 2021 07:20
if (de_ctx->max_uniq_toclient_groups == 23 &&
de_ctx->max_uniq_toserver_groups == 27)
result = 1;
PASS_IF(de_ctx->max_uniq_toclient_groups == 23 &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using FAIL_IF(!expression) instead here and other places where the final result is not yet known.

This structures the test as a series of FAIL occurrences with a final PASS if none of the failures has triggered.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you review! makes more sense this way.
Ill Include the changes in a PR-V2

@ghostinthehive
Copy link
Contributor Author

Opened PR-v2 #6525

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants