Alan Boshier
07/27/2022, 8:18 AM[2022-07-27T08:00:39Z INFO pact_mock_server::hyper_server] Received request HTTP Request ( method: GET, path: /foo/1/bar, query: None, headers: Some({"accept": ["application/json"], "authorization": ["Bearer undefined"], "user-agent": ["node-fetch/1.0 (+<https://github.com/bitinn/node-fetch>)"], "accept-encoding": ["gzip", "deflate"], "connection": ["close"], "host": ["127.0.0.1:52198"]}), body: Empty )
[2022-07-27T08:00:39Z INFO pact_matching] comparing to expected HTTP Request ( method: GET, path: /fooBlah/1/bar, query: None, headers: Some({"Accept": ["application/json"]}), body: Missing )
[2022-07-27T08:00:39Z INFO pact_mock_server::hyper_server] Request matched, sending response HTTP Response ( status: 200, headers: Some({"Content-Type": ["application/json"]}), body: Present(266 bytes, application/json) )
I'm looking for strings like comparing to expected HTTP Request
in the pact and pact-core codebase but not having any luck - could someone point me at where these are?
[Some GLIBC-related blockers prevent me moving to beta62 at this time]Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Alan Boshier
07/27/2022, 8:23 AMAlan Boshier
07/27/2022, 8:42 AMmatch_path()
function and do this:
match_values(&path, &context.select_best_matcher(&path), expected.to_string(), actual.to_string())
All I can guess is that this works as expected unless the fromProviderState
matcher was used on the path; maybe something to do with the select_best_matcher
function?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
/foo/1/bar
but the fromProviderState
matcher is configured as fromProviderState(‘/fooBlah/{id}/bar’, ‘/fooBlah/1/bar’)