Avoid xargs -r
The -r option is not available on OS X
This commit is contained in:
parent
5fe9411d88
commit
2cba8a8d5f
4 changed files with 16 additions and 4 deletions
|
@ -4,7 +4,10 @@ load test_helpers
|
|||
function setup {
|
||||
# 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
|
||||
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 {
|
||||
# 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
|
||||
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 {
|
||||
# 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
|
||||
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 {
|
||||
# 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
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue