Alex P
03/23/2023, 2:17 PM"request": {
"method": "POST",
"urlPattern": "/store|/v2/store",
"queryParameters": {
"client": {
"matches": "STORE-ABC-.+"
},
...
}
}
and the second looks like this
"request": {
"method": "POST",
"urlPattern": "/store|/v2/store",
"queryParameters": {
"client": {
"matches": "STORE-123-.+"
},
...
}
},
Both have additional but the same query parameters to match. Both also have different body patterns to match.
When I send this request (from WireMock's log)
POST /v2/store?client=STORE-123-12345&user=userId&realm=realm&key=sessionId
I see that WireMock only tries the other request (STORE-ABC) but fails because it cannot match some parts of the body patterns of STORE-ABC, even though STORE-123 would match.
So I wonder if WireMock even tries the STORE-123 mock because I cannot see it in the log.
More curiosly, at the very end I get a "closest stub" that is a completely different stub where of course neither URL nor body match; how come it shows this, and not for example the stubs it tried?urlPattern
that it ignores queryParameters
? 😮urlPathPattern
in that case. It's even documented, I just didn't read it careful enough...