-
Notifications
You must be signed in to change notification settings - Fork 115
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
Every other response fails - Endpoint examples matching order flip flops each run. #155
Comments
On closer look (thanks for the better log messages!), the endpoint in question has three examples. Looks like each time, the order they are processed flips. (1,2,3) on the first run. (3,2,1) on the second run. It would be nice if the behavior was always (1,2,3) so that you can put more explicit endpoint first, and more generic (catch all) endpoints later, with predictable results. This becomes more important when using Dredd for contract testing, wanting to cover more request / response scenarios. |
First of all. I want to thank you for all the hard work that has been put into this tool. We're excited to use it and it has sped up our development.
Last week, something changed. When sending the same exact request, every other response is matched incorrectly. Here are some details to help with debugging:
Here's the dockerfile used with Drakov:
Here's the config.js
The request is a simple get request to an endpoint with an Authorization header.
Here are the logs. The only difference I can see in the logs is the order in which the
MATCHING
occurs and the finalDRAKOV
response. Again, the request is identical.Failing response or incorrect matching:
Correct response and matching:
Every time I make this identical request, it toggles back and forth between the two responses.
In my .apib file, the first two examples have an 'Authorization' header, the third does not. My guess is that every other request, this third example is matched, even though the header is present in the request, and should have matched the first example which has the same header.
First example in .apib:
Third example in .apib:
If I remove the third example, the problem goes away. Thing is, I need that example for Dredd contract testing. Any help in resolving this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: