Skip to content

Commit

Permalink
Rewrite some integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolftimmermans committed Jun 27, 2016
1 parent 46c12f3 commit 7a2477f
Show file tree
Hide file tree
Showing 5 changed files with 472 additions and 459 deletions.
12 changes: 9 additions & 3 deletions bin/integration-tests
Expand Up @@ -41,7 +41,11 @@ function restore_config {
}

function start_services {
docker-compose up -d --force-recreate --build
if [ "${KEEP_ALIVE}" ]; then
docker-compose up -d --build > /dev/null
else
docker-compose up -d --build --force-recreate > /dev/null
fi
}

function stop_services {
Expand All @@ -60,14 +64,16 @@ function wait_for_services {
}

function setup {
prepare_test_config
start_services
wait_for_services
prepare_test_config
}

function teardown {
restore_config
stop_services
if ! [ "${KEEP_ALIVE}" ]; then
stop_services
fi
}

trap teardown EXIT
Expand Down
2 changes: 1 addition & 1 deletion config/Dockerfile-phantomjs
@@ -1,4 +1,4 @@
FROM servebox/phantomjs:latest
FROM wernight/phantomjs:2

EXPOSE 8910

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Expand Up @@ -29,11 +29,17 @@ services:
phantomjs:
ports:
- 8910:8910
volumes:
- ./test/fixtures:/test/fixtures
build:
context: config
dockerfile: Dockerfile-phantomjs

webservice:
ports:
- 80:80
volumes:
- ./test/mock-tinypng-webservice:/var/www/html
build:
context: config
dockerfile: Dockerfile-mock-webservice

0 comments on commit 7a2477f

Please sign in to comment.