Test should test the current branch version and not the 'latest'.

This commit is contained in:
Abhilash Raj
2017-05-23 15:59:20 -07:00
committed by Abhilash Raj
parent cda6d2a95a
commit d4b0b74860
2 changed files with 17 additions and 1 deletions

View File

@@ -12,7 +12,8 @@ install:
- docker-compose --version
before_script:
- docker-compose up -d
- tests/generate_tests.sh
- docker-compose -f docker-compose.yaml -f docker-test.yaml up -d
- docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mailman-core
- docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mailman-web
- docker-compose ps

15
tests/generate_tests.sh Normal file
View File

@@ -0,0 +1,15 @@
if [ "$TRAVIS_BRANCH" = "master" ]; then
TAG="latest"
else
TAG="$TRAVIS_BRANCH"
fi
cat > docker-test.yaml <<EOF
services:
mailman-core:
image:maxking/mailman-core:$TAG
mailman-web:
image:maxking/mailman-web:$TAG
EOF