1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-13 11:54:34 +00:00

tests: refactoring

This commit is contained in:
Thomas LEVEIL
2015-09-30 23:40:04 +00:00
parent 4bd30f5d2c
commit b4d1acbf2d
3 changed files with 7 additions and 26 deletions

View File

@ -12,16 +12,7 @@ function setup {
SUT_CONTAINER=bats-nginx-proxy-${TEST_FILE}-1
# GIVEN a webserver with VIRTUAL_HOST set to web.bats
docker_clean bats-web
run docker run -d \
--label bats-type="web" \
--name bats-web \
-e VIRTUAL_HOST=web.bats \
--expose 80 \
-w /var/www \
python:3 \
python -m http.server 80
assert_success
prepare_web_container bats-web 80 -e VIRTUAL_HOST=web.bats
# WHEN nginx-proxy runs with DEFAULT_HOST set to web.bats
run nginxproxy $SUT_CONTAINER -v /var/run/docker.sock:/tmp/docker.sock:ro -e DEFAULT_HOST=web.bats