Browse Source

Skip all multiple zone tests on Bash 4.{1,2,3}

test-fixes
Silke 9 months ago
parent
commit
6b06035038
  1. 12
      test.sh
  2. 8
      tests/v1/multi_zone.sh

12
test.sh

@ -77,17 +77,29 @@ _MATCH() {
fi
}
_RUN() {
if [[ -n "${SKIP_ALL:-}" ]]; then
_SKIP
return
fi
IFS=" " read -ra args <<< "$1"
out=$(./pdns_api.sh "${args[@]}" 2>&1)
shift
_MATCH "$out" "$@"
}
_SKIP() {
echo -e "\\t[$(_COLOR 34 SKIPPED)]"
}
_SKIP_ALL() {
export SKIP_ALL=1
}
_RELOAD_CONFIG() {
source tests/config
if [[ $# -gt 0 ]]; then
export PDNS_VERSION="$1"
fi
export SKIP_ALL=
}
# Run all tests

8
tests/v1/multi_zone.sh

@ -1,6 +1,14 @@
#!/bin/bash
_TEST "V1 Multiple zones"
# These versions should work fine, but the requests are ordered differently.
# This results in a test failure that can be ignored.
if [[ "${BASH_VERSION}" < "4.4." ]]
then
_SKIP_ALL
fi
_SUBTEST "Deploy"
_RUN 'deploy_challenge host1.example.com _ token1 host2.zone.example.com _ token2' \
'PATCH http://hostname:8000/api/v1/servers/servername/zones/example.com.' \

Loading…
Cancel
Save