From f0455ad019bb8bbf3efc2a6e4bd4ca1bb654062c Mon Sep 17 00:00:00 2001 From: Kameron Kenny - pi501 Date: Thu, 19 Dec 2024 16:27:38 -0500 Subject: [PATCH] add sub-domains --- test/integration/dns/thelinux.pro/helper.bash | 4 ++-- test/integration/dns/thelinux.pro/ns1/helper.bash | 4 ++++ .../dns/thelinux.pro/ns1/local-setup.bash | 11 +++++++++++ test/integration/dns/thelinux.pro/ns1/tests.bat | 12 ++++++++++++ test/integration/dns/thelinux.pro/ns2/helper.bash | 4 ++++ .../dns/thelinux.pro/ns2/local-setup.bash | 11 +++++++++++ test/integration/dns/thelinux.pro/ns2/tests.bat | 12 ++++++++++++ test/integration/dns/thelinux.pro/www/helper.bash | 4 ++++ .../dns/thelinux.pro/www/local-setup.bash | 11 +++++++++++ test/integration/dns/thelinux.pro/www/tests.bat | 12 ++++++++++++ 10 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 test/integration/dns/thelinux.pro/ns1/helper.bash create mode 100644 test/integration/dns/thelinux.pro/ns1/local-setup.bash create mode 100644 test/integration/dns/thelinux.pro/ns1/tests.bat create mode 100644 test/integration/dns/thelinux.pro/ns2/helper.bash create mode 100644 test/integration/dns/thelinux.pro/ns2/local-setup.bash create mode 100644 test/integration/dns/thelinux.pro/ns2/tests.bat create mode 100644 test/integration/dns/thelinux.pro/www/helper.bash create mode 100644 test/integration/dns/thelinux.pro/www/local-setup.bash create mode 100644 test/integration/dns/thelinux.pro/www/tests.bat diff --git a/test/integration/dns/thelinux.pro/helper.bash b/test/integration/dns/thelinux.pro/helper.bash index 5f85714..97cdad5 100644 --- a/test/integration/dns/thelinux.pro/helper.bash +++ b/test/integration/dns/thelinux.pro/helper.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -export domain="kameronkenny.com" +export domain="thelinux.pro" export ip="204.8.15.81" -export serial="24070101" +export serial="24052503" diff --git a/test/integration/dns/thelinux.pro/ns1/helper.bash b/test/integration/dns/thelinux.pro/ns1/helper.bash new file mode 100644 index 0000000..bf509a2 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns1/helper.bash @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +export domain="ns1.thelinux.pro" +export ip="204.8.15.80" diff --git a/test/integration/dns/thelinux.pro/ns1/local-setup.bash b/test/integration/dns/thelinux.pro/ns1/local-setup.bash new file mode 100644 index 0000000..7558397 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns1/local-setup.bash @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +_local_setup() { + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/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/thelinux.pro/ns1/tests.bat b/test/integration/dns/thelinux.pro/ns1/tests.bat new file mode 100644 index 0000000..0803cc6 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns1/tests.bat @@ -0,0 +1,12 @@ +#!/usr/bin/env bats + +load 'local-setup' +_local_setup + +load 'helper' + +@test "Test A Record: ${domain}" { + run _check_a_record + assert_output --partial "${ip}" +} + diff --git a/test/integration/dns/thelinux.pro/ns2/helper.bash b/test/integration/dns/thelinux.pro/ns2/helper.bash new file mode 100644 index 0000000..65e88a1 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns2/helper.bash @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +export domain="ns2.thelinux.pro" +export ip="204.8.15.81" diff --git a/test/integration/dns/thelinux.pro/ns2/local-setup.bash b/test/integration/dns/thelinux.pro/ns2/local-setup.bash new file mode 100644 index 0000000..7558397 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns2/local-setup.bash @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +_local_setup() { + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/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/thelinux.pro/ns2/tests.bat b/test/integration/dns/thelinux.pro/ns2/tests.bat new file mode 100644 index 0000000..0803cc6 --- /dev/null +++ b/test/integration/dns/thelinux.pro/ns2/tests.bat @@ -0,0 +1,12 @@ +#!/usr/bin/env bats + +load 'local-setup' +_local_setup + +load 'helper' + +@test "Test A Record: ${domain}" { + run _check_a_record + assert_output --partial "${ip}" +} + diff --git a/test/integration/dns/thelinux.pro/www/helper.bash b/test/integration/dns/thelinux.pro/www/helper.bash new file mode 100644 index 0000000..aff0c55 --- /dev/null +++ b/test/integration/dns/thelinux.pro/www/helper.bash @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +export domain="www.thelinux.pro" +export ip="204.8.15.81" diff --git a/test/integration/dns/thelinux.pro/www/local-setup.bash b/test/integration/dns/thelinux.pro/www/local-setup.bash new file mode 100644 index 0000000..7558397 --- /dev/null +++ b/test/integration/dns/thelinux.pro/www/local-setup.bash @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +_local_setup() { + DIR="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/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/thelinux.pro/www/tests.bat b/test/integration/dns/thelinux.pro/www/tests.bat new file mode 100644 index 0000000..0803cc6 --- /dev/null +++ b/test/integration/dns/thelinux.pro/www/tests.bat @@ -0,0 +1,12 @@ +#!/usr/bin/env bats + +load 'local-setup' +_local_setup + +load 'helper' + +@test "Test A Record: ${domain}" { + run _check_a_record + assert_output --partial "${ip}" +} +