From 29f1d614eb1c01e2d9faa7d151d7e4d096a12048 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Wed, 31 May 2017 16:30:42 +0200 Subject: [PATCH] Trying to make moco thing work --- .../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 c44d535580..2088eb47cc 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,7 +8,8 @@ 1.1.2.BUILD-SNAPSHOT .. - spring-cloud-contract-stub-runner-moco-contract-jar + com.example + fraudDetectionServerMoco 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/shouldSayHello.json b/tests/spring-cloud-contract-stub-runner-moco-contract-jar/src/main/resources/META-INF/com.example/fraudDetectionServerMoco/1.0.0/mappings/nested/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/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/nested/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 5cbf274f11..60dfc9eed6 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,12 +37,11 @@ import spock.lang.Specification * @author Marcin Grzejszczak */ @ContextConfiguration(classes = MocoConfig, loader = SpringBootContextLoader) -// tag::[classpath_stub_runner] @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) -// to use stubs from classpath just provide ids without passing any other properties to -// @AutoConfigureStubRunner -@AutoConfigureStubRunner( ids = ["com.example:fraudDetectionServerMoco"]) -// end::[classpath_stub_runner] +@AutoConfigureStubRunner(ids = ["com.example:fraudDetectionServerMoco:+:"], + workOffline = true, + stubsPerConsumer = true, + consumerName = "nested") @DirtiesContext @ActiveProfiles("test") class MocoHttpServerStubSpec extends Specification {