hoverfly
hoverfly copied to clipboard
Hoverfly does not match on scheme
Currently, the scheme field is ignored by matchers. It should be matched on like the remaining fields.
It's not satisfactory but we would like to know if this impacts anybody else as we fear fixing it could affect many existing simulations
Should this be added while we're at v6? dropping the scheme from matchers when simulation's version is lower than v6 (printing a warning if scheme is provided) and keeping it for v6+? @tommysitu
@ns3777k don't worry about this one, it's really non-essential.
I have a similar issue, but with the query field. On one pair object I have this:
"request" : {
...
"query": {
"account_numbers": [
{
"matcher": "exact",
"value": "ACC001"
}
]
}
...
}
And in another Pair, the following:
"request" : {
...
"query": {
"account_numbers": [
{
"matcher": "exact",
"value": "ACC002"
},
{
"matcher": "exact",
"value": "ACC003"
}
]
}
...
}
No matter what query parameters are used in the request, it always matches the first pair, I can also change the order and will retrieve whichever was set as the first pair.
So both:
http://url/endpoint/?account_numbers=ACC001
or
http://url/endpoint/?account_numbers=ACC002&account_numbers=ACC003
will retrieve the same response.
Additional info: I'm using 1.3.1 (currently Stable)
This is prompted when running the proxy:
Hoverfly has been set to simulate mode with a matching strategy of 'strongest'
WARNING: data.pairs[1] is not added due to a conflict with the existing simulation
Note: The only difference between the pairs is the query field.
Hi @jiss2891, for query params with multiple values, the current way to do it is this:
"request" : {
...
"query": {
"account_numbers": [
{
"matcher": "exact",
"value": "ACC002;ACC003"
}
]
}
...
}
Thanks for answer me. I'll try this!
Still getting this:
WARNING: data.pairs[1] is not added due to a conflict with the existing simulation
I think that the query
field is not being considered to differentiate two pairs from each other and that produces a conflict.
If I modify any attr, for example: destination
this warning will not be prompted. If I change the query attribute from account_numbers
to this_should_be_different
(only on one pair...) the warning still prompts up.
Hey @jiss2891, I can't reproduce the issue. can you join Gitter https://gitter.im/SpectoLabs/hoverfly please? we can discuss there.
Just left a comment there.