33 lines
779 B
Batchfile
33 lines
779 B
Batchfile
#!/usr/bin/env bats
|
|
|
|
setup() {
|
|
load 'bats-support'
|
|
load 'bats-assert'
|
|
}
|
|
|
|
export domain="kameronkenny.com"
|
|
export serial="24070101"
|
|
@test "Test A Record: kameronkenny.com" {
|
|
run dig -t A kameronkenny.com +noall +answer
|
|
assert_output --partial '204.8.15.81'
|
|
}
|
|
|
|
@test "Test SOA Serial: kameronkenny.com" {
|
|
run dig -t SOA kameronkenny.com +noall +answer +multi
|
|
assert_output --partial "${serial}"
|
|
}
|
|
|
|
# in.thelinuxpro.net
|
|
serial="24121801"
|
|
## nagios.in.thelinuxpro.net
|
|
domain="nagios.in.thelinuxpro.net"
|
|
@test "Test A Record: ${domain}" {
|
|
dig -t A ${domain} +noall +answer
|
|
assert_output --partial '10.99.23.36'
|
|
}
|
|
|
|
@test "Test SOA Serial: nagios.in.thelinuxpro.net" {
|
|
dig -t SOA nagios.in.thelinuxpro.net +noall +answer +multi
|
|
assert_output --partial "${serial}"
|
|
}
|