Compare commits
4 Commits
10b044a678
...
913f36ccaf
Author | SHA1 | Date |
---|---|---|
|
913f36ccaf | |
|
b2aad3eef3 | |
|
22f0853d32 | |
|
ca661f052a |
|
@ -0,0 +1,2 @@
|
|||
.DS_Store
|
||||
TEST-*.xml
|
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu/bind9:9.18-22.04_beta
|
||||
|
||||
LABEL version="20241020.1.1"
|
||||
LABEL version="20241218.1.1"
|
||||
LABEL description="bind9 primary nameserver"
|
||||
|
||||
ENV BIND_LIB_DIR=/var/lib/bind
|
||||
|
|
|
@ -102,6 +102,12 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Integration Tests') {
|
||||
steps {
|
||||
sh 'bats -F junit test/integration/dns.bat' > TEST-Integration-dns.xml
|
||||
}
|
||||
}
|
||||
|
||||
stage('test primary dns') {
|
||||
steps {
|
||||
sh 'dig ns1.thelinuxpro.net ANY @204.8.15.80'
|
||||
|
|
|
@ -18,7 +18,7 @@ services:
|
|||
container_name: ns1
|
||||
build:
|
||||
dockerfile: Dockerfile.primary
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:241020.1.1
|
||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/bind9-primary:241218.1.1
|
||||
restart: always
|
||||
user: root
|
||||
environment:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$TTL 3600
|
||||
@ IN SOA in.thelinuxpro.net. hostmaster.in.thelinuxpro.net. (
|
||||
24062501 ; serial
|
||||
24121801 ; serial
|
||||
21600 ; refresh after 6 hours
|
||||
3600 ; retry after 1 hour
|
||||
604800 ; expire after 1 week
|
||||
|
@ -23,6 +23,7 @@ $TTL 3600
|
|||
33.23 IN PTR unpoller.in.thelinuxpro.net.
|
||||
34.23 IN PTR pihole-exporter.in.thelinuxpro.net.
|
||||
35.23 IN PTR blackbox-exporter.in.thelinuxpro.net.
|
||||
36.23 IN PTR nagios.in.thelinuxpro.net.
|
||||
41.23 IN PTR influxdb.in.thelinuxpro.net.
|
||||
42.23 IN PTR telegraf.in.thelinuxpro.net.
|
||||
51.23 IN PTR syslog.in.thelinuxpro.net.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
$TTL 2m
|
||||
@ IN SOA in.thelinuxpro.net. root.in.thelinuxpro.net. (
|
||||
24102001 ; serial, todays date + todays serial #
|
||||
24121801 ; serial, todays date + todays serial #
|
||||
1h ; refresh, seconds
|
||||
15m ; retry, seconds
|
||||
10D ; expire, seconds
|
||||
|
@ -32,6 +32,7 @@ prometheus IN A 10.99.23.32
|
|||
unpoller IN A 10.99.23.33
|
||||
pihole-exporter IN A 10.99.23.34
|
||||
blackbox-exporter IN A 10.99.23.35
|
||||
nagios IN A 10.99.23.36
|
||||
influxdb IN A 10.99.23.41
|
||||
telegraf IN A 10.99.23.42
|
||||
syslog IN A 10.99.23.51
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bats
|
||||
|
||||
@test "Test A Record: kameronkenny.com" {
|
||||
r=$(dig -t A kameronkenny.com +noall +answer | awk '{ print $5 }')
|
||||
[ "$r" == "204.8.15.81" ]
|
||||
}
|
||||
|
||||
@test "Test SOA Serial: kameronkenny.com" {
|
||||
r=$(dig -t SOA kameronkenny.com +noall +answer +multi | grep serial | awk '{ print $1 }')
|
||||
[ "$r" == "24070101" ]
|
||||
}
|
||||
|
||||
# in.thelinuxpro.net
|
||||
serial="24121801"
|
||||
|
||||
## nagios.in.thelinuxpro.net
|
||||
|
||||
@test "Test A Record: nagios.in.thelinuxpro.net" {
|
||||
r=$(dig -t A kameronkenny.com +noall +answer | awk '{ print $5 }')
|
||||
[ "$r" == "10.99.23.36" ]
|
||||
}
|
||||
|
||||
@test "Test SOA Serial: nagios.in.thelinuxpro.net" {
|
||||
r=$(dig -t SOA kameronkenny.com +noall +answer +multi | grep serial | awk '{ print $1 }')
|
||||
[ "$r" == "24121801" ]
|
||||
}
|
Loading…
Reference in New Issue