In a Spring test user can add this annotation to run stubs rather than rely on auto configuration (which might not be welcome outside a test). Fixes gh-33
21 lines
604 B
Bash
Executable File
21 lines
604 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -o errexit
|
|
|
|
LOCAL_MAVEN_REPO=${LOCAL_MAVEN_REPO-~/.m2}
|
|
VERIFIER_VERSION=${VERIFIER_VERSION:-1.0.0.BUILD-SNAPSHOT}
|
|
ROOT=`pwd`
|
|
|
|
cat <<EOF
|
|
Running tests with the following parameters
|
|
LOCAL_MAVEN_REPO=${LOCAL_MAVEN_REPO}
|
|
VERIFIER_VERSION=${VERIFIER_VERSION}
|
|
EOF
|
|
|
|
echo -e "\n\nClearing saved stubs"
|
|
rm -rf $LOCAL_MAVEN_REPO/repository/org/springframework/cloud/contract/testprojects/
|
|
|
|
echo -e "\n\nRunning tests for Maven (HTTP communication)\n\n"
|
|
echo -e "Building server (uses Spring Cloud Contract Verifier Maven Plugin)"
|
|
./mvnw clean install -Dspring-contract.version=${VERIFIER_VERSION}
|