1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2024-11-22 03:46:29 +00:00

Avoid xargs -r

The -r option is not available on OS X
This commit is contained in:
Mike Dillon 2015-10-09 23:10:38 -07:00
parent 5fe9411d88
commit 2cba8a8d5f
4 changed files with 16 additions and 4 deletions

View File

@ -4,7 +4,10 @@ load test_helpers
function setup { function setup {
# make sure to stop any web container before each test so we don't # make sure to stop any web container before each test so we don't
# have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set # have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set
docker ps -q --filter "label=bats-type=web" | xargs -r docker stop >&2 CIDS=( $(docker ps -q --filter "label=bats-type=web") )
if [ ${#CIDS[@]} -gt 0 ]; then
docker stop ${CIDS[@]} >&2
fi
} }

View File

@ -5,7 +5,10 @@ SUT_CONTAINER=bats-nginx-proxy-${TEST_FILE}
function setup { function setup {
# make sure to stop any web container before each test so we don't # make sure to stop any web container before each test so we don't
# have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set # have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set
docker ps -q --filter "label=bats-type=web" | xargs -r docker stop >&2 CIDS=( $(docker ps -q --filter "label=bats-type=web") )
if [ ${#CIDS[@]} -gt 0 ]; then
docker stop ${CIDS[@]} >&2
fi
} }

View File

@ -5,7 +5,10 @@ SUT_CONTAINER=bats-nginx-proxy-${TEST_FILE}
function setup { function setup {
# make sure to stop any web container before each test so we don't # make sure to stop any web container before each test so we don't
# have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set # have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set
docker ps -q --filter "label=bats-type=web" | xargs -r docker stop >&2 CIDS=( $(docker ps -q --filter "label=bats-type=web") )
if [ ${#CIDS[@]} -gt 0 ]; then
docker stop ${CIDS[@]} >&2
fi
} }

View File

@ -5,7 +5,10 @@ SUT_CONTAINER=bats-nginx-proxy-${TEST_FILE}
function setup { function setup {
# make sure to stop any web container before each test so we don't # make sure to stop any web container before each test so we don't
# have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set # have any unexpected contaiener running with VIRTUAL_HOST or VIRUTAL_PORT set
docker ps -q --filter "label=bats-type=web" | xargs -r docker stop >&2 CIDS=( $(docker ps -q --filter "label=bats-type=web") )
if [ ${#CIDS[@]} -gt 0 ]; then
docker stop ${CIDS[@]} >&2
fi
} }