mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-22 11:56:31 +00:00
Avoid xargs -r
The -r option is not available on OS X
This commit is contained in:
parent
5fe9411d88
commit
2cba8a8d5f
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user