Messaging support for stub runner boot
With this change by adding --thin.profile=kafka or --thin.profile=rabbit we're able to turn on messaging support for stub runner boot. Also for Docker, you will be able to pass MESSAGING_TYPE env var with either rabbit or kafka as a value and we'll run the messaging support for you. fixes gh-1468
This commit is contained in:
@@ -6,4 +6,12 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
echo "Running Spring Cloud Contract Stub Runner"
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /stub-runner-boot.jar
|
||||
ADDITIONAL_OPTS="${ADDITIONAL_OPTS:-}"
|
||||
MESSAGING_TYPE="${MESSAGING_TYPE:-}"
|
||||
|
||||
if [[ "${MESSAGING_TYPE}" != "" ]]; then
|
||||
echo "Messaging type passed, will active thin profile [${MESSAGING_TYPE}]"
|
||||
ADDITIONAL_OPTS="${ADDITIONAL_OPTS} --thin.profile=${MESSAGING_TYPE}"
|
||||
fi
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /stub-runner-boot.jar ${ADDITIONAL_OPTS}
|
||||
|
||||
@@ -110,6 +110,10 @@ from the container's `.m2`. Mount your local `.m2` as a volume available at the
|
||||
|
||||
CAUTION: You must not set both `EXTERNAL_CONTRACTS_WORK_OFFLINE` and `EXTERNAL_CONTRACTS_REPO_WITH_BINARIES_URL`.
|
||||
|
||||
The following environment variables are used when running messaging based tests:
|
||||
|
||||
- `MESSAGING_TYPE` - what type of messaging system are you using (currently supported are `rabbit`, `kafka`)
|
||||
|
||||
The following environment variables are used when tests are run:
|
||||
|
||||
- `APPLICATION_BASE_URL`: URL against which tests should be run.
|
||||
@@ -214,6 +218,11 @@ The dot (`.`) should be replaced with underscore (`_`) characters. For example,
|
||||
the `stubrunner.repositoryRoot` property should be represented
|
||||
as a `STUBRUNNER_REPOSITORY_ROOT` environment variable.
|
||||
|
||||
In addition to those variables you can set the following ones:
|
||||
|
||||
- `MESSAGING_TYPE` - what type of messaging system are you using (currently supported are `rabbit`, `kafka`)
|
||||
- `ADDITIONAL_OPTS` - any additional properties that you would like to pass to the application
|
||||
|
||||
[[docker-stubrunner-example]]
|
||||
=== Example of Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user