Skip to content

Commit

Permalink
Run tests for correct version
Browse files Browse the repository at this point in the history
Run tests for docker containers with currently build
version. Containers should not be downloaded from
docker repository, but be build before tests.
  • Loading branch information
marten-cz committed Feb 21, 2017
1 parent b6592ed commit 0e478e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ before_install:
- docker build -t test:local ./Test

script:
- make test
- VERSION="$TRAVIS_BRANCH" make test

# only push up tags
after_success:
Expand Down
7 changes: 4 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
DEBUG=''
VERSION=${VERSION:-3.0.1-germanium}

if [ -n "$1" ] && [ $1 == 'debug' ]; then
DEBUG='-debug'
Expand Down Expand Up @@ -30,12 +31,12 @@ docker logs -f $HUB &
sleep 2

echo 'Starting Selenium Chrome node...'
NODE_CHROME=$(docker run -d --link $HUB_NAME:hub selenium/node-chrome$DEBUG:3.0.1-germanium)
NODE_CHROME=$(docker run -d --link $HUB_NAME:hub selenium/node-chrome$DEBUG:${VERSION})
echo 'Starting Selenium Firefox node...'
NODE_FIREFOX=$(docker run -d --link $HUB_NAME:hub selenium/node-firefox$DEBUG:3.0.1-germanium)
NODE_FIREFOX=$(docker run -d --link $HUB_NAME:hub selenium/node-firefox$DEBUG:${VERSION})
if [ -z $DEBUG ]; then
echo 'Starting Selenium PhantomJS node...'
NODE_PHANTOMJS=$(docker run -d --link $HUB_NAME:hub selenium/node-phantomjs:3.0.1-germanium)
NODE_PHANTOMJS=$(docker run -d --link $HUB_NAME:hub selenium/node-phantomjs:${VERSION})
fi
docker logs -f $NODE_CHROME &
docker logs -f $NODE_FIREFOX &
Expand Down

0 comments on commit 0e478e3

Please sign in to comment.