Iulian Poenaru
02/21/2022, 3:04 PMIulian Poenaru
02/21/2022, 3:05 PMFailed to verify Pact! Actual request does not match expected interactions...
Reason:
Missing request
Expected:
POST /graphql
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Marko (IttyBittyApps / pact-swift)
02/21/2022, 10:20 PMIulian Poenaru
02/22/2022, 8:35 AMIulian Poenaru
02/23/2022, 4:22 PMIulian Poenaru
02/23/2022, 4:24 PMIulian Poenaru
02/23/2022, 4:27 PMMarko (IttyBittyApps / pact-swift)
02/23/2022, 8:56 PMMarko (IttyBittyApps / pact-swift)
02/23/2022, 8:59 PMIulian Poenaru
02/24/2022, 6:50 PMIulian Poenaru
02/24/2022, 6:51 PMIulian Poenaru
02/24/2022, 6:57 PMMarko (IttyBittyApps / pact-swift)
02/24/2022, 11:39 PMCodable
. As it iterates through the content, extracts any Matcher
and ExampleGenerators
you send it and erases them into a custom AnyEncodable
type so that it can be sent across http and the payload is prepared for PactSwiftMockServer
to consume and be able to interact with.
When you serialised your json body into your jsonData
you sent something that doesn't conform to Encodable
- validate jsonData does not include something weird.Marko (IttyBittyApps / pact-swift)
02/24/2022, 11:41 PM"null"
, it should've been fine in your regular REST interactions as it's defined as a String
. If you'd need to define a "nullable_value": null
you'd need to use a Matcher.MatchNull
- again due to conforming to Codable
protocol.Marko (IttyBittyApps / pact-swift)
02/24/2022, 11:50 PMExpected 'null' to be equal to 'null' - Body does not match the expected body definition
This message is coming from the pact rust core.
There is also a way to log interactions between PactSwift and Pact rust-core by setting an env var in your scheme:
PACT_ENABLE_LOGGING: all
Marko (IttyBittyApps / pact-swift)
02/24/2022, 11:54 PMExpected a Map with keys id, operationName, query but received one with keys id, operationName, query, variables - Body does not match the expected body definition.
is pretty much a valid test and it is failing (because it seems to be too strict). You are defining the expectation that your client will send a specific object with 3 keys, but your client is actually sending an object with 4 keys. So that means your client is not honouring the contract and doing something different to the set expectations.Iulian Poenaru
02/25/2022, 2:49 PMIulian Poenaru
02/25/2022, 3:03 PMIulian Poenaru
02/25/2022, 3:16 PMIulian Poenaru
02/25/2022, 3:18 PMIulian Poenaru
02/25/2022, 4:38 PMtmp/Pact
folder.Marko (IttyBittyApps / pact-swift)
02/25/2022, 10:09 PMIulian Poenaru
03/01/2022, 8:33 AM