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

feat: use random status code if negotiation fails #12

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

P0lip
Copy link
Member

@P0lip P0lip commented Dec 5, 2024

Summary

A (almost) one-liner to ensure we pick a random status code from chaos.codes if none of the codes are defined on the operation. test-harness/specs/config/chaos_random_missing_codes.txt illustrates that behavior well.
I also added one extra test to assert we pick a wildcard response if there's on defined.

Checklist

  • The basics
    • I tested these changes manually in my local or dev environment
  • Tests
    • Added or updated
    • N/A
  • Event Tracking
    • I added event tracking and followed the event tracking guidelines
    • N/A
  • Error Reporting
    • I reported errors and followed the error reporting guidelines
    • N/A

@P0lip P0lip requested a review from a team December 5, 2024 15:30
@P0lip P0lip self-assigned this Dec 5, 2024
Copy link
Collaborator

@dotslashderek dotslashderek left a comment

Choose a reason for hiding this comment

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

Lol I stared at the test-harness changes for too long :D 🚀

@P0lip P0lip merged commit e3d421b into main Dec 6, 2024
3 checks passed
@P0lip P0lip deleted the jrozek/dev/random-error-code branch December 6, 2024 11:58
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.

2 participants