Files
docker-machine/test/integration/helpers.bash
Nathan LeClaire 2a15d98575 First steps to make ssh command smoother
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-21 12:16:47 -07:00

32 lines
636 B
Bash

#!/bin/bash
teardown() {
echo "$BATS_TEST_NAME
----------
$output
----------
" >> ${BATS_LOG}
}
function errecho () {
>&2 echo "$@"
}
function force_env () {
if [[ ${!1} != "$2" ]]; then
errecho "This test requires the $1 environment variable to be set to $2 in order to run properly."
exit 1
fi
}
function require_env () {
if [[ -z ${!1} ]]; then
errecho "This test requires the $1 environment variable to be set in order to run."
exit 1
fi
}
# Make sure these aren't set while tests run (can cause confusing behavior)
unset DOCKER_HOST DOCKER_TLS_VERIFY DOCKER_CERT_DIR