-
Notifications
You must be signed in to change notification settings - Fork 92
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
chore: Add status code matcher example #354
chore: Add status code matcher example #354
Conversation
There is a status code matcher in the core, but it's not yet available via the "integration JSON" (i.e. via FFI) |
Actually, it does look like that matcher is available now: https://github.com/pact-foundation/pact-reference/blob/7a1d6b374d1a1b68a50d9cdab62a1ebd554ec70a/rust/pact_ffi/IntegrationJson.md#L1 |
@mefellows Yes, it's the |
ha interesting. Are you sure that matcher works on items that aren't the response code? Does it just look at numbers in general? |
I tested again, and it doesn't work as expected (any number e.g. 204 still valid for status code serverError). So this matcher is useless now. Let me update this PR, remove this matcher completely |
Ah, I think that might have been why that matcher doesn't work - you can't pass it in to |
I checked again, there are several scenarios about that matcher in compatibility suite's v4/matching_rule So instead of remove that matcher, I think creating a |
0e39d41
to
5c93471
Compare
This PR is green when that PR is merged and new version is released |
4cc3355
to
be6c131
Compare
be6c131
to
e5db014
Compare
I will bypass the review process for this PR |
This matcher can't be used to match the response code unfortunately, because currently
pactffi_response_status
only allow integer status.But it can be useful to match a value in body (like this example), query parameter or header.