Bumped WireMock to 2.18.0; fixes gh-659

This commit is contained in:
Marcin Grzejszczak
2018-05-29 17:08:39 +02:00
parent af93d926cb
commit ca7ce7522c
7 changed files with 30 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
<name>spring-cloud-contract-dependencies</name>
<description>Spring Cloud Contract Dependencies</description>
<properties>
<wiremock.version>2.17.0</wiremock.version>
<wiremock.version>2.18.0</wiremock.version>
<jsonassert.version>0.4.12</jsonassert.version>
<aether.version>1.0.2.v20150114</aether.version>
<rest-assured.version>3.0.7</rest-assured.version>

View File

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
wiremockVersion=2.17.0
wiremockVersion=2.18.0
jsonAssertVersion=0.4.12
verifierVersion=2.0.0.BUILD-SNAPSHOT

View File

@@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
wiremockVersion=2.17.0
wiremockVersion=2.18.0
jsonAssertVersion=0.4.12
verifierVersion=2.0.0.BUILD-SNAPSHOT

View File

@@ -13,6 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
wiremockVersion=2.17.0
wiremockVersion=2.18.0
jsonAssertVersion=0.4.12
verifierVersion=2.0.0.BUILD-SNAPSHOT

View File

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
wiremockVersion=2.17.0
wiremockVersion=2.18.0
jsonAssertVersion=0.4.12
verifierVersion=2.0.0.BUILD-SNAPSHOT

View File

@@ -7,6 +7,7 @@ import java.util.UUID;
import com.github.tomakehurst.wiremock.client.BasicCredentials;
import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;
import com.github.tomakehurst.wiremock.client.ScenarioMappingBuilder;
import com.github.tomakehurst.wiremock.common.Metadata;
import com.github.tomakehurst.wiremock.extension.Parameters;
import com.github.tomakehurst.wiremock.http.Request;
import com.github.tomakehurst.wiremock.http.RequestMethod;
@@ -142,6 +143,18 @@ class BasicMappingBuilder implements ScenarioMappingBuilder {
return this;
}
@Override public ScenarioMappingBuilder withMetadata(Map<String, ?> map) {
throw new UnsupportedOperationException("Metadata not supported");
}
@Override public ScenarioMappingBuilder withMetadata(Metadata metadata) {
throw new UnsupportedOperationException("Metadata not supported");
}
@Override public ScenarioMappingBuilder withMetadata(Metadata.Builder builder) {
throw new UnsupportedOperationException("Metadata not supported");
}
@Override public StubMapping build() {
if (this.scenarioName == null && (this.requiredScenarioState != null
|| this.newScenarioState != null)) {

View File

@@ -131,6 +131,18 @@ class WireMockHttpRequestAdapter implements Request {
return new RequestMethod(this.result.getMethod().name());
}
@Override public String getScheme() {
return this.result.getUrl().getScheme();
}
@Override public String getHost() {
return this.result.getUrl().getHost();
}
@Override public int getPort() {
return this.result.getUrl().getPort();
}
@Override public String getClientIp() {
return "127.0.0.1";
}