Skip to content

Commit

Permalink
Regression rollback (#213)
Browse files Browse the repository at this point in the history
* fix: revert mockserver version because of regression

* feat: add test to prevent regression on assertions with path parameters
  • Loading branch information
nkhalis authored Jan 31, 2024
1 parent b6cdeba commit 59f89bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public NottableStringMultiMap(MockServerLogger mockServerLogger, boolean control
public boolean containsAll(MockServerLogger mockServerLogger, MatchDifference context, NottableStringMultiMap subset) {
switch (subset.keyMatchStyle) {
case SUB_SET: {
boolean isSubset = containsSubset(mockServerLogger, context, regexStringMatcher, subset.entryList(), entryList());
boolean isSubset = containsSubset(regexStringMatcher, subset.entryList(), entryList());
if (!isSubset && context != null) {
context.addDifference(mockServerLogger, "multimap subset match failed subset:{}was not a subset of:{}", subset.entryList(), entryList());
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<lombok.version>1.18.30</lombok.version>
<testcontainer.version>1.19.4</testcontainer.version>
<mockserver.version>5.15.0</mockserver.version>
<mockserver.version>5.13.2</mockserver.version>
<cucumber.version>7.15.0</cucumber.version>
<commonstext.version>1.11.0</commonstext.version>
<zookeeper.version>3.9.1</zookeeper.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1471,4 +1471,13 @@ Feature: to interact with an http service and setup mocks

Then getting on "http://backend/test/S1/path/C2" returns a status OK_200

And "http://backend/test/S1/path/C2" has received a GET
And "http://backend/test/S1/path/C2" has received a GET

Scenario: Path parameters are properly handled
Given that getting on "http://backend/test/S(\d)/path/C(\d)" will return a status OK_200

Then getting on "http://backend/test/S1/path/C2" returns a status OK_200
Then getting on "http://backend/test/S2/path/C3" returns a status OK_200

And "http://backend/test/S2/path/C3" has received a GET
And "http://backend/test/S1/path/C2" has received a GET

0 comments on commit 59f89bc

Please sign in to comment.