mirror of https://github.com/docker/docs.git
integration helpers: allow tests to be located in subdirectories.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
9d3dd85cf1
commit
75c54c22a1
|
|
@ -47,7 +47,7 @@ function teardown() {
|
||||||
start_docker 2
|
start_docker 2
|
||||||
swarm_manage
|
swarm_manage
|
||||||
|
|
||||||
run docker -H ${HOSTS[0]} build -t test $BATS_TEST_DIRNAME/testdata/build
|
run docker -H ${HOSTS[0]} build -t test $TESTDATA/build
|
||||||
[ "$status" -eq 0 ]
|
[ "$status" -eq 0 ]
|
||||||
|
|
||||||
# pull busybox to force the refresh images
|
# pull busybox to force the refresh images
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Root directory of integration tests.
|
||||||
|
INTEGRATION_ROOT=$(dirname "$(readlink -f "$BASH_SOURCE")")
|
||||||
|
|
||||||
|
# Test data path.
|
||||||
|
TESTDATA="${INTEGRATION_ROOT}/testdata"
|
||||||
|
|
||||||
# Root directory of the repository.
|
# Root directory of the repository.
|
||||||
SWARM_ROOT=${SWARM_ROOT:-${BATS_TEST_DIRNAME}/../..}
|
SWARM_ROOT=${SWARM_ROOT:-$(cd "$INTEGRATION_ROOT/../.."; pwd -P)}
|
||||||
|
|
||||||
# Path of the Swarm binary.
|
# Path of the Swarm binary.
|
||||||
SWARM_BINARY=${SWARM_BINARY:-${SWARM_ROOT}/swarm}
|
SWARM_BINARY=${SWARM_BINARY:-${SWARM_ROOT}/swarm}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue