Tien Vo
10/23/2023, 1:31 AMTien Vo
10/23/2023, 1:31 AMpactffi_with_header_v2($interactionId, $ffi->InteractionPart_Response, 'X-IMPROVED', 0, '{"value":["like","regex","values","arrayContaining"],"pact:matcher:type":"values"}');
Tien Vo
10/23/2023, 1:32 AM{
"consumer": {
"name": "matchersConsumer"
},
"interactions": [
{
"description": "A get request to /matchers",
"request": {},
"response": {
"body": {},
"headers": {
"X-IMPROVED": [
"like",
"regex",
"values",
"arrayContaining"
]
},
"matchingRules": {
"header": {
"$['X-IMPROVED']": {
"combine": "AND",
"matchers": [
{
"match": "values"
}
]
}
}
},
"status": 200
},
"transport": "http",
"type": "Synchronous/HTTP"
}
],
"metadata": {
"pactSpecification": {
"version": "4.0"
}
},
"provider": {
"name": "matchersProvider"
}
}
Tien Vo
10/23/2023, 1:32 AMX-IMPROVED: regex, like, values, arrayContaining
Tien Vo
10/23/2023, 1:33 AMFailures:
1) Verifying a pact between matchersConsumer and matchersProvider Given Get Matchers - A get request to /matchers
1.1) includes header 'X-IMPROVED' with value 'like'
Expected header 'X-IMPROVED' to have value 'like' but was 'like'
Expected header 'X-IMPROVED' to have value 'regex' but was 'regex'
Expected header 'X-IMPROVED' to have value 'values' but was 'values'
Expected header 'X-IMPROVED' to have value 'arrayContaining' but was 'arrayContaining'
rholshausen
10/23/2023, 10:12 PMTien Vo
10/24/2023, 1:49 AM'like' is not equals to 'like'
?rholshausen
10/24/2023, 3:00 AMrholshausen
10/24/2023, 3:01 AM"match": "values"
with headers. It doesn't make much sense using that, as it sets up a type matcher, and headers are all the same type (strings)rholshausen
10/24/2023, 3:02 AMrholshausen
10/24/2023, 3:03 AMTien Vo
10/24/2023, 3:06 AMvalues
or arrayContaining
for headers, then I will report this bug.
If we are NOT allowed, then I think we need a way to prevent this from happening, and show some other errors instead.
btw, I will report the bug for now.Tien Vo
10/24/2023, 3:21 AM