-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't workingsmartbear-supportedIssues with this label have been added to the Pactflow team's Jira backlogIssues with this label have been added to the Pactflow team's Jira backlog
Description
Here's the demo code: https://github.com/stan-is-hate/pact-go/pull/1/files
You can run make demo-error to check these scenarios.
I've discovered this error when I was testing a case where a provider returns a repeated string field (similar to tags) that consumer doesn't care about, so I didn't specify it in the consumer at all.
Turns out it's an issue even when the provider doesn't actually send back any value:
- If you omit a repeated field (tags) in the request (in TestSaveFeature), the test will fail with:
Failed to match the request message - BodyMismatches({"$.tags": [BodyMismatch { path: "$.tags", expected: None, actual: None, mismatch: "Expected repeated field 'tags' to be empty but received 1 values" }]}) - If you omit a repeated field (tags) in the expected response (in either test):
- consumer test passes
- but provider test fails with:
Expected repeated field 'tags' to be empty but received 1 values
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsmartbear-supportedIssues with this label have been added to the Pactflow team's Jira backlogIssues with this label have been added to the Pactflow team's Jira backlog