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

Issue with http_spec Configuration: Tests Panic Despite fail Annotation #703

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

amitksingh1490
Copy link
Collaborator

@amitksingh1490 amitksingh1490 commented Nov 29, 2023

Summary:

Description

I've encountered a behavior inconsistency in the http_spec configuration concerning the handling of assertions when the fail annotation is used. According to the current functionality, the tests are expected to pass when the underlying assertions fail, and they should also fail if the assertions unexpectedly pass. However, I'm observing that the tests are panicking in scenarios where they should ideally pass while using fail annotation.

Expected Behavior

With the fail annotation in the http_spec configuration, the expected behavior should be as follows:

  • On Assertion Failure: The test should pass. This aligns with the intent of the fail annotation, where assertion failures are anticipated.
  • On Assertion Success: If the assertion unexpectedly passes, the test should also fail.

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh --mode=fix to fix all linting issues raised by ./lint.sh --mode=check.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly (if applicable).
  • I have performed a self-review of my own code.

@github-actions github-actions bot added the bug label Nov 29, 2023
@amitksingh1490 amitksingh1490 changed the title test: Issue with http_spec Configuration: Tests Panic Despite fail Annotation Issue with http_spec Configuration: Tests Panic Despite fail Annotation Nov 29, 2023
@amitksingh1490 amitksingh1490 merged commit 03f53dd into main Nov 30, 2023
16 checks passed
@amitksingh1490 amitksingh1490 deleted the fix/fail-annotation branch November 30, 2023 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant