From b3334bc9e586ae1bebb9f458f7f87ba635d03108 Mon Sep 17 00:00:00 2001 From: Ivan Povalyukhin Date: Sun, 29 Mar 2015 17:45:54 -0700 Subject: [PATCH] adjust env vars in test_helper to make CI pass --- test/plugins/base.plugin.bats | 8 ++++++++ test/test_helper.bash | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/test/plugins/base.plugin.bats b/test/plugins/base.plugin.bats index 41c9ea5c..9bc9f0e6 100755 --- a/test/plugins/base.plugin.bats +++ b/test/plugins/base.plugin.bats @@ -5,6 +5,10 @@ load ../../lib/composure load ../../plugins/available/base.plugin @test 'plugins base: ips()' { + if [[ $CI ]]; then + skip 'ifconfig probably requires sudo on TravisCI' + fi + declare -r localhost='127.0.0.1' run ips assert_success @@ -12,6 +16,10 @@ load ../../plugins/available/base.plugin } @test 'plugins base: myip()' { + if [[ ! $CI ]]; then + skip 'myip is slow - run only on CI' + fi + run myip assert_success declare -r mask_ip=$(echo $output | tr -s '[0-9]' '?') diff --git a/test/test_helper.bash b/test/test_helper.bash index faf2b081..850b6161 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -10,12 +10,7 @@ BASH_IT_TEST_DIR="${BATS_TMPDIR}/.bash_it" # guard against executing this block twice due to bats internals if [ "$BASH_IT_ROOT" != "${BASH_IT_TEST_DIR}/root" ]; then export BASH_IT_ROOT="${BASH_IT_TEST_DIR}/root" - export HOME="${BASH_IT_TEST_DIR}/home" export BASH_IT=$BASH_IT_TEST_DIR - - PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin - PATH="${BASH_IT_TEST_DIR}/bin:$PATH" - export PATH fi teardown() {