BUmped wiremock to 2.20.0; fixes gh-925
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<name>spring-cloud-contract-dependencies</name>
|
||||
<description>Spring Cloud Contract Dependencies</description>
|
||||
<properties>
|
||||
<wiremock.version>2.19.0</wiremock.version>
|
||||
<wiremock.version>2.20.0</wiremock.version>
|
||||
<jsonassert.version>0.4.13</jsonassert.version>
|
||||
<rest-assured.version>3.2.0</rest-assured.version>
|
||||
</properties>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.19.0
|
||||
wiremockVersion=2.20.0
|
||||
jsonAssertVersion=0.4.13
|
||||
verifierVersion=2.1.0.BUILD-SNAPSHOT
|
||||
groovyVersion=2.4.15
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.19.0
|
||||
wiremockVersion=2.20.0
|
||||
jsonAssertVersion=0.4.13
|
||||
verifierVersion=2.1.0.BUILD-SNAPSHOT
|
||||
bootVersion=2.1.1.RELEASE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.19.0
|
||||
wiremockVersion=2.20.0
|
||||
jsonAssertVersion=0.4.13
|
||||
verifierVersion=2.1.0.BUILD-SNAPSHOT
|
||||
bootVersion=2.1.1.RELEASE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
wiremockVersion=2.19.0
|
||||
wiremockVersion=2.20.0
|
||||
jsonAssertVersion=0.4.13
|
||||
verifierVersion=2.1.0.BUILD-SNAPSHOT
|
||||
bootVersion=2.1.1.RELEASE
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.github.tomakehurst.wiremock.client.BasicCredentials;
|
||||
import com.github.tomakehurst.wiremock.client.MappingBuilder;
|
||||
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
|
||||
import com.github.tomakehurst.wiremock.client.ScenarioMappingBuilder;
|
||||
import com.github.tomakehurst.wiremock.common.Metadata;
|
||||
@@ -45,6 +46,8 @@ class BasicMappingBuilder implements ScenarioMappingBuilder {
|
||||
|
||||
private Map<String, Parameters> postServeActions = new LinkedHashMap<>();
|
||||
|
||||
private Metadata metadata = new Metadata();
|
||||
|
||||
BasicMappingBuilder(RequestMethod method, UrlPattern urlPattern) {
|
||||
this.requestPatternBuilder = new RequestPatternBuilder(method, urlPattern);
|
||||
}
|
||||
@@ -166,17 +169,38 @@ class BasicMappingBuilder implements ScenarioMappingBuilder {
|
||||
|
||||
@Override
|
||||
public ScenarioMappingBuilder withMetadata(Map<String, ?> map) {
|
||||
throw new UnsupportedOperationException("Metadata not supported");
|
||||
this.metadata = new Metadata(map);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScenarioMappingBuilder withMetadata(Metadata metadata) {
|
||||
throw new UnsupportedOperationException("Metadata not supported");
|
||||
this.metadata = metadata;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScenarioMappingBuilder withMetadata(Metadata.Builder builder) {
|
||||
throw new UnsupportedOperationException("Metadata not supported");
|
||||
this.metadata = builder.build();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScenarioMappingBuilder andMatching(ValueMatcher<Request> requestMatcher) {
|
||||
this.requestPatternBuilder.andMatching(requestMatcher);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MappingBuilder andMatching(String customRequestMatcherName) {
|
||||
this.requestPatternBuilder.andMatching(customRequestMatcherName);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MappingBuilder andMatching(String customRequestMatcherName, Parameters parameters) {
|
||||
this.requestPatternBuilder.andMatching(customRequestMatcherName, parameters);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -199,6 +223,7 @@ class BasicMappingBuilder implements ScenarioMappingBuilder {
|
||||
mapping.setPersistent(this.isPersistent);
|
||||
mapping.setPostServeActions(
|
||||
this.postServeActions.isEmpty() ? null : this.postServeActions);
|
||||
mapping.setMetadata(this.metadata);
|
||||
return mapping;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user