Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some failing testcases were being falsely passed because the failure was not being correctly detected. Mostly this was around the appropriate application of matching rules, where several bugs have been fixed: - confusing between rule paths being "headers" vs. "header" in v2/v3 - "path" rule paths were being incorrectly prefixed internally in v3 - array element iteration was always treating the spec as a single sample, breaking rules applying to specific array elements fixes #11
- Loading branch information
1 parent
7cb23a4
commit 03a3c82
Showing
8 changed files
with
164 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '2.5.0' | ||
__version__ = '2.6.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
pactman/test/testcases-version-3/response/array contents match.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"match": true, | ||
"comment": "match third array element by type", | ||
"expected": { | ||
"headers": {"Content-Type": "application/json"}, | ||
"body": ["a", "b", "c"], | ||
"matchingRules": { | ||
"body": { | ||
"$[2]": {"matchers": [{"match": "type"}]} | ||
} | ||
} | ||
|
||
}, | ||
"actual": { | ||
"headers": { | ||
"Content-Type": "application/json" | ||
}, | ||
"body": ["a", "b", "c"] | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
pactman/test/testcases-version-3/response/matches content type with charset.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"match": false, | ||
"comment": "content-type is different *and* charset presence differs", | ||
"expected" : { | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
}, | ||
"actual": { | ||
"headers": { | ||
"Content-Type": "text/plain; charset=UTF-8" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.