Skip to content

Instantly share code, notes, and snippets.

@tarquin-the-brave
Last active May 12, 2020 11:01
Show Gist options
  • Save tarquin-the-brave/7a2d813015d049fbe40e3723b0795be4 to your computer and use it in GitHub Desktop.
Save tarquin-the-brave/7a2d813015d049fbe40e3723b0795be4 to your computer and use it in GitHub Desktop.
Code examples for [my blog post](https://tarquin-the-brave.github.io/blog/posts/mockserver-dc/) on using mockserver to FV test microservices.
version: "3.7"
services:
test:
build: ./fv
command: <command to run tests> ${TEST_ARGS}
microservice:
image: ${IMAGE:-x:latest}
environment:
LOG_LEVEL: debug
volumes:
- type: bind
source: ./fv/microservice_config.yaml
target: /config/config.yaml
mockdeps:
image: jamesdbloom/mockserver:mockserver-5.9.0
expose:
- 12345
# Mockserver has the server itself as ENTRYPOINT,
# so the "command" here needs to be only the arguments
# we pass to it.
command: ["-serverPort", "12345", "-logLevel", "INFO"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment