Tien Vo
07/27/2023, 3:43 PMpact.addInteraction({
states: [...],
uponReceiving: '...',
withRequest: {...},
willRespondWith: {
status: 200,
headers: {...},
body: {
min: 1,
'pact:matcher:type': 'type', // I am aware that I'm using custom version of `eachLike`
value: [ // NOTE example value has 3 values, not 1 when we use `eachLike`
{
id: uuid(id),
father: uuid(father),
mother: uuid(mother),
},
{
id: father,
},
{
id: mother,
}
],
},
},
});
Now provider response body (trimmed and reformatted, not real structure) look like this:
[
{
"id": "79c4b8d7-5224-32cf-8ff1-ef0bcaedc1e3",
"father": "f897f1b7-3867-318c-9f34-06480ffd0fab",
"mother": "7973a31e-856e-3940-acbb-9e21e7f627bf",
},
{
"id": "7973a31e-856e-3940-acbb-9e21e7f627bf",
"father": null,
"mother": null,
},
{
"id": "f897f1b7-3867-318c-9f34-06480ffd0fab",
"father": null,
"mother": null,
}
]
I expected provider's verification will failed (because matching rule uuid on father and mother ), but it still passed. Do you know why?Matt (pactflow.io / pact-js / pact-go)
uuid matchers?)Tien Vo
07/28/2023, 1:35 AM1) Verifying a pact between admin and relationship Given Users with full information - get list users with full information
1.1) has a matching body
$[1].rels.mother -> Expected '' to match '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
$[1].rels.father -> Expected '' to match '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
$[2].rels.father -> Expected '' to match '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
$[2].rels.mother -> Expected '' to match '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'Tien Vo
07/28/2023, 1:42 AMTien Vo
07/28/2023, 1:44 AMMatt (pactflow.io / pact-js / pact-go)
idTien Vo
07/28/2023, 3:17 AMmatchingRules), except the example values I removed of courseMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tien Vo
07/28/2023, 3:25 AMyou can occasionally supply invalid values to a matcher definition (i.e. incompatible with the matcher)I believe we need to handle this one in ffi library, not in every languages that use it? Should I create a bug for it, for pact-reference project, with my example code/information?
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Tien Vo
07/28/2023, 3:55 AMTien Vo
07/28/2023, 5:16 AM