Skip to content

Commit 1fa0935

Browse files
This is final
1 parent 010939d commit 1fa0935

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spring-cloud-contract.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,11 @@ $ export PROJECT_VERSION="0.0.1.RELEASE"
279279

280280
# Execute contract tests
281281
$ docker run --rm -e "APPLICATION_BASE_URL=${APPLICATION_BASE_URL}" \
282-
-e "PUBLISH_ARTIFACTS=true" -e "PROJECT_NAME=${PROJECT_NAME}" \
283-
-e "PROJECT_GROUP=${PROJECT_GROUP}" -e "REPO_WITH_BINARIES_URL=${ARTIFACTORY_URL}" \
284-
-e "PROJECT_VERSION=${PROJECT_VERSION}" -v "${CURRENT_DIR}/contracts/:/contracts:ro" \
285-
-v "${CURRENT_DIR}/node_modules/spring-cloud-contract/output:/spring-cloud-contract-output/" \
286-
springcloud/spring-cloud-contract:"${SC_CONTRACT_DOCKER_VERSION}"
282+
-e "PUBLISH_ARTIFACTS=true" -e "PROJECT_NAME=${PROJECT_NAME}" \
283+
-e "PROJECT_GROUP=${PROJECT_GROUP}" -e "REPO_WITH_BINARIES_URL=${ARTIFACTORY_URL}" \
284+
-e "PROJECT_VERSION=${PROJECT_VERSION}" -v "${CURRENT_DIR}/contracts/:/contracts:ro" \
285+
-v "${CURRENT_DIR}/node_modules/spring-cloud-contract/output:/spring-cloud-contract-output/" \
286+
springcloud/spring-cloud-contract:"${SC_CONTRACT_DOCKER_VERSION}"
287287

288288
# Kill app
289289
$ pkill -f "node app"
@@ -327,9 +327,9 @@ $ export STUBRUNNER_IDS="com.example:bookstore:0.0.1.RELEASE:stubs:9876"
327327
$ export STUBRUNNER_REPOSITORY_ROOT="http://${APP_IP}:8081/artifactory/libs-release-local"
328328
# Run the docker with Stub Runner Boot
329329
$ docker run --rm -e "STUBRUNNER_IDS=${STUBRUNNER_IDS}" \
330-
-e "STUBRUNNER_REPOSITORY_ROOT=${STUBRUNNER_REPOSITORY_ROOT}" \
331-
-p "${STUBRUNNER_PORT}:${STUBRUNNER_PORT}" -p "9876:9876" \
332-
springcloud/spring-cloud-contract-stub-runner:"${SC_CONTRACT_DOCKER_VERSION}"
330+
-e "STUBRUNNER_REPOSITORY_ROOT=${STUBRUNNER_REPOSITORY_ROOT}" \
331+
-p "${STUBRUNNER_PORT}:${STUBRUNNER_PORT}" -p "9876:9876" \
332+
springcloud/spring-cloud-contract-stub-runner:"${SC_CONTRACT_DOCKER_VERSION}"
333333
```
334334

335335
That script:
@@ -345,7 +345,7 @@ On the server side, we built a stateful stub. Let's use curl to assert that the
345345
```bash
346346
# let's execute the first request (no response is returned)
347347
$ curl -H "Content-Type:application/json" -X POST \
348-
--data '{ "title" : "Title", "genre" : "Genre", "description" : "Description", "author" : "Author", "publisher" : "Publisher", "pages" : 100, "image_url" : "https://d213dhlpdb53mu.cloudfront.net/assets/pivotal-square-logo-41418bd391196c3022f3cd9f3959b3f6d7764c47873d858583384e759c7db435.svg", "buy_url" : "https://pivotal.io" }' http://localhost:9876/api/books
348+
--data '{ "title" : "Title", "genre" : "Genre", "description" : "Description", "author" : "Author", "publisher" : "Publisher", "pages" : 100, "image_url" : "https://d213dhlpdb53mu.cloudfront.net/assets/pivotal-square-logo-41418bd391196c3022f3cd9f3959b3f6d7764c47873d858583384e759c7db435.svg", "buy_url" : "https://pivotal.io" }' http://localhost:9876/api/books
349349
# Now it's time for the second request
350350
$ curl -X GET http://localhost:9876/api/books
351351
# You should receive the contents of the JSON

0 commit comments

Comments
 (0)