From cd67e1f0ea757ee271eabfc8c8cae4678ad204d2 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Wed, 31 May 2017 16:42:50 +0200 Subject: [PATCH] Revert "Trying to make moco thing work" This reverts commit 29f1d614eb1c01e2d9faa7d151d7e4d096a12048. --- .../pom.xml | 3 +-- .../1.0.0/mappings/{nested => }/shouldSayHello.json | 0 .../provider/moco/MocoHttpServerStubSpec.groovy | 9 +++++---- 3 files changed, 6 insertions(+), 6 deletions(-) rename tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/{nested => }/shouldSayHello.json (100%) diff --git a/tests/spring-cloud-contract-stub-runner-moco-contract-jar/pom.xml b/tests/spring-cloud-contract-stub-runner-moco-contract-jar/pom.xml index 2088eb47cc..c44d535580 100644 --- a/tests/spring-cloud-contract-stub-runner-moco-contract-jar/pom.xml +++ b/tests/spring-cloud-contract-stub-runner-moco-contract-jar/pom.xml @@ -8,8 +8,7 @@ 1.1.2.BUILD-SNAPSHOT .. - com.example - fraudDetectionServerMoco + spring-cloud-contract-stub-runner-moco-contract-jar jar Spring Cloud Contract Stub Runner Moco Contract Jar Spring Cloud Contract Stub Runner Moco Contract Jar diff --git a/tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/nested/shouldSayHello.json b/tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/shouldSayHello.json similarity index 100% rename from tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/nested/shouldSayHello.json rename to tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/shouldSayHello.json diff --git a/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy index 60dfc9eed6..5cbf274f11 100644 --- a/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy +++ b/tests/spring-cloud-contract-stub-runner-moco/src/test/groovy/org/springframework/cloud/contract/stubrunner/provider/moco/MocoHttpServerStubSpec.groovy @@ -37,11 +37,12 @@ import spock.lang.Specification * @author Marcin Grzejszczak */ @ContextConfiguration(classes = MocoConfig, loader = SpringBootContextLoader) +// tag::[classpath_stub_runner] @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) -@AutoConfigureStubRunner(ids = ["com.example:fraudDetectionServerMoco:+:"], - workOffline = true, - stubsPerConsumer = true, - consumerName = "nested") +// to use stubs from classpath just provide ids without passing any other properties to +// @AutoConfigureStubRunner +@AutoConfigureStubRunner( ids = ["com.example:fraudDetectionServerMoco"]) +// end::[classpath_stub_runner] @DirtiesContext @ActiveProfiles("test") class MocoHttpServerStubSpec extends Specification {