forked from PowerDNS/pdns
/
command
executable file
·55 lines (44 loc) · 1.08 KB
/
command
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
mysqldiff
RECORDNAME=occluded.sub.test.dyndns
echo '* Check that the name cannot be found'
cleandig $RECORDNAME ANY hidesoadetails
echo '* Create the occluded name in the parent zone'
cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update add $RECORDNAME. 3600 CNAME parent
send
answer
!
echo '* Check that the name cannot be found'
cleandig $RECORDNAME ANY hidesoadetails
echo '* Create a record in the child zone'
cleannsupdate <<!
server $nameserver $port
zone sub.test.dyndns
update add $RECORDNAME. 3600 CNAME child
send
answer
!
echo '* Check that the child zone record is visible'
cleandig $RECORDNAME A hidesoadetails
echo '* Remove child record'
cleannsupdate <<!
server $nameserver $port
zone sub.test.dyndns
update delete $RECORDNAME. 3600 CNAME child
send
answer
!
echo '* Check that the occluded name is invisible again'
cleandig $RECORDNAME ANY hidesoadetails
echo '* Remove parent record'
cleannsupdate <<!
server $nameserver $port
zone test.dyndns
update delete $RECORDNAME. 3600 CNAME parent
send
answer
!
mysqldiff 1 "check that we cleaned up correctly"