diff --git a/Jenkinsfile b/Jenkinsfile index 661e854..2adb804 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -105,9 +105,9 @@ pipeline { stage('Integration Tests') { steps { sh 'mkdir -p test/results/integration' - sh 'bats -F junit test/integration/dns/thelinux.pro/*.bat test/integration/dns/thelinux.pro/**/*.bat > test/results/integration/TEST-Integration-dns-thelinux_pro.xml' - sh 'bats -F junit test/integration/dns/kameronkenny.com/*.bat test/integration/dns/kameronkenny.com/**/*.bat > test/results/integration/TEST-Integration-dns-kameronkenny_com.xml' - sh 'bats -F junit test/integration/dns/in.thelinuxpro.net/*.bat test/integration/dns/in.thelinuxpro.net/**/*.bat > test/results/integration/TEST-Integration-dns-in_thelinuxpro_net.xml' + sh 'bats -F junit --gather-test-outputs-in test/results/integration test/integration/dns/thelinux.pro/*.bat test/integration/dns/thelinux.pro/**/*.bat + sh 'bats -F junit --gather-test-outputs-in test/results/integration test/integration/dns/kameronkenny.com/*.bat test/integration/dns/kameronkenny.com/**/*.bat + sh 'bats -F junit --gather-test-outputs-in test/results/integration test/integration/dns/in.thelinuxpro.net/*.bat test/integration/dns/in.thelinuxpro.net/**/*.bat } } } diff --git a/test/integration/dns/in.thelinuxpro.net/a.bat b/test/integration/dns/in.thelinuxpro.net/a.bat deleted file mode 100644 index 24c333d..0000000 --- a/test/integration/dns/in.thelinuxpro.net/a.bat +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bats - -load 'local-setup' -_local_setup - -load 'helper' - - -@test "Test A Record: ${domain}" { - run dig -t A ${domain} +noall +answer - assert_output --partial "${ip}" -} diff --git a/test/integration/dns/in.thelinuxpro.net/local-setup.bash b/test/integration/dns/in.thelinuxpro.net/local-setup.bash index c47a365..ce0a943 100644 --- a/test/integration/dns/in.thelinuxpro.net/local-setup.bash +++ b/test/integration/dns/in.thelinuxpro.net/local-setup.bash @@ -2,9 +2,10 @@ _local_setup() { DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd)" - TEST_ROOT="$( cd "$( dirname "$DIR/../../" )" >/dev/null 2>&1 && pwd)" + TEST_ROOT="$( cd "$( dirname "$DIR/../../../" )" >/dev/null 2>&1 && pwd)" bats_load_library bats-support bats_load_library bats-assert + load "$TEST_ROOT/test_helper/dns-functions" source "$DIR/helper.bash" } diff --git a/test/integration/dns/in.thelinuxpro.net/soa.bat b/test/integration/dns/in.thelinuxpro.net/soa.bat deleted file mode 100644 index d182dfe..0000000 --- a/test/integration/dns/in.thelinuxpro.net/soa.bat +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bats - -load 'local-setup' -_local_setup - -load 'helper' - - -@test "Test SOA Record: ${domain}" { - run dig -t SOA ${domain} +noall +answer +multi - assert_output --partial "${serial}" -}