Skip to content

Commit

Permalink
Move some tests to afraid.org
Browse files Browse the repository at this point in the history
  • Loading branch information
timkimber committed Oct 31, 2022
1 parent 11225dc commit eeb4f4f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions test/u1-test-get_auth_dns-dig.bats
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ teardown() {
# Disable CNAME check
_TEST_SKIP_CNAME_CALL=1

PUBLIC_DNS_SERVER=ns1.duckdns.org
PUBLIC_DNS_SERVER=ns1.afraid.org
CHECK_PUBLIC_DNS_SERVER=false
CHECK_ALL_AUTH_DNS=false

run get_auth_dns ubuntu-getssl.duckdns.org
run get_auth_dns ubuntu-getssl.ignorelist.com

# Assert that we've found the primary_ns server
assert_output --regexp 'set primary_ns = ns[1-9]+\.duckdns\.org'
assert_output --regexp 'set primary_ns = ns[1-3]+\.afraid\.org'
# Assert that we had to use dig NS
assert_line --regexp 'Using dig.* NS'

# Check all Authoritive DNS servers are returned if requested
CHECK_ALL_AUTH_DNS=true
run get_auth_dns ubuntu-getssl.duckdns.org
assert_output --regexp 'set primary_ns = (ns[1-9]+\.duckdns\.org )+'
run get_auth_dns ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns = (ns[1-3]+\.afraid\.org ?)+'
}


Expand Down
10 changes: 5 additions & 5 deletions test/u2-test-get_auth_dns-drill.bats
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,21 @@ teardown() {
_TEST_SKIP_CNAME_CALL=1
_TEST_SKIP_SOA_CALL=1

PUBLIC_DNS_SERVER=ns1.duckdns.org
PUBLIC_DNS_SERVER=ns1.afraid.org
CHECK_PUBLIC_DNS_SERVER=false
CHECK_ALL_AUTH_DNS=false

run get_auth_dns ubuntu-getssl.duckdns.org
run get_auth_dns ubuntu-getssl.ignorelist.com

# Assert that we've found the primary_ns server
assert_output --regexp 'set primary_ns = ns[1-9]+\.duckdns\.org'
assert_output --regexp 'set primary_ns = ns[1-3]+\.afraid\.org'
# Assert that we had to use drill NS
assert_line --regexp 'Using drill.* NS'

# Check all Authoritive DNS servers are returned if requested
CHECK_ALL_AUTH_DNS=true
run get_auth_dns ubuntu-getssl.duckdns.org
assert_output --regexp 'set primary_ns = (ns[1-9]+\.duckdns\.org )+'
run get_auth_dns ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns = (ns[1-3]+\.afraid\.org ?)+'
}


Expand Down
20 changes: 10 additions & 10 deletions test/u7-test-get_auth_dns-nslookup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ teardown() {
CHECK_PUBLIC_DNS_SERVER=false
CHECK_ALL_AUTH_DNS=false

run get_auth_dns ubuntu-getssl.duckdns.org
run get_auth_dns ubuntu-getssl.ignorelist.com

# Assert that we've found the primary_ns server
#assert_output --regexp 'set primary_ns = ns[1-9]+\.duckdns\.org'
#assert_output --regexp 'set primary_ns = ns[1-3]+\.afraid\.org'
# Assert that we had to use dig NS
#assert_line --regexp 'Using nslookup.* NS'

# Check all Authoritive DNS servers are returned if requested
CHECK_ALL_AUTH_DNS=true
run get_auth_dns _acme-challenge.ubuntu-getssl.duckdns.org
assert_output --regexp 'set primary_ns=(ns[1-9]+\.duckdns\.org )+'
run get_auth_dns _acme-challenge.ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns=(ns[1-3]+\.afraid\.org )+'
}


Expand All @@ -92,24 +92,24 @@ teardown() {
CHECK_PUBLIC_DNS_SERVER=false
CHECK_ALL_AUTH_DNS=false

run get_auth_dns _acme-challenge.ubuntu-getssl.duckdns.org
run get_auth_dns _acme-challenge.ubuntu-getssl.ignorelist.com

# Assert that we've found the primary_ns server
assert_output --regexp 'set primary_ns=ns[1-9]+\.duckdns\.org'
assert_output --regexp 'set primary_ns=ns[1-3]+\.afraid\.org'

# Assert that we had to use nslookup NS
assert_line --regexp 'Using nslookup.*-type=soa'
assert_line --regexp 'Using nslookup.*-type=ns'

# Check all Authoritive DNS servers are returned if requested
CHECK_ALL_AUTH_DNS=true
run get_auth_dns _acme-challenge.ubuntu-getssl.duckdns.org
assert_output --regexp 'set primary_ns=(ns[1-9]+\.duckdns\.org )+'
run get_auth_dns _acme-challenge.ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns=(ns[1-3]+\.afraid\.org )+'

# Check that we also check the public DNS server if requested
CHECK_PUBLIC_DNS_SERVER=true
run get_auth_dns _acme-challenge.ubuntu-getssl.duckdns.org
assert_output --regexp 'set primary_ns=(ns[1-9]+\.duckdns\.org )+ 1\.0\.0\.1'
run get_auth_dns _acme-challenge.ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns=(ns[1-3]+\.afraid\.org )+ 1\.0\.0\.1'
}


Expand Down

0 comments on commit eeb4f4f

Please sign in to comment.