~ubuntu-branches/ubuntu/wily/maradns/wily-proposed

« back to all changes in this revision

Viewing changes to deadwood-3.2.07/sqa/dwood2rc_n_dns_port/do.test

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski, Tomasz Buchert, Dariusz Dwornikowski
  • Date: 2015-03-27 18:34:08 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20150327183408-wnfachdkdjt96yu6
Tags: 2.0.11-1
[ Tomasz Buchert ]
* Imported Upstream version 2.0.11

[ Dariusz Dwornikowski ]
* d/patches: 
  - refreshed all patches for new deadwood version
  - removed generating of random prime on build (Closes: #785536) 
* d/rules: date taken from changelog (Closes: #785535)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# This is a basic Deadwood test to make sure it works
 
4
 
 
5
killall maradns > /dev/null 2>&1 # Don't run this test on Solaris
 
6
sleep 2
 
7
 
 
8
cat > mararc << EOF
 
9
chroot_dir="$( pwd )"
 
10
ipv4_bind_addresses="127.0.0.2"
 
11
csv2 = {}
 
12
csv2["example.com."] = "db.example.com"
 
13
EOF
 
14
 
 
15
cat > db.example.com << EOF
 
16
*.% A 10.1.2.3
 
17
EOF
 
18
 
 
19
# OK, test the server
 
20
../../../server/maradns -f mararc > /dev/null 2>&1 &
 
21
#../../../server/maradns -f mararc &
 
22
sleep 1
 
23
 
 
24
# Now, make sure Deadwood works
 
25
 
 
26
for PORT in 53 5300 ; do
 
27
 
 
28
cat > dwood2rc << EOF
 
29
chroot_dir="$( pwd )"
 
30
ipv4_bind_addresses="127.0.0.1"
 
31
upstream_servers = {}
 
32
upstream_servers["."]="127.0.0.2"
 
33
recursive_acl="127.0.0.1/16"
 
34
dns_port=${PORT}
 
35
filter_rfc1918 = 0
 
36
EOF
 
37
 
 
38
../../src/Deadwood -f dwood2rc > /dev/null &
 
39
#../../src/Deadwood -f dwood2rc &
 
40
sleep 1
 
41
dig @127.0.0.1 -p ${PORT} www1.example.com. | \
 
42
        grep -v 'global options' | perl -pe 's/>>.*<<//;
 
43
s/id:.*//;
 
44
s/time:.*//;
 
45
s/WHEN:.*//;' | awk '/example.com/ {gsub(/86[0-9][0-9][0-9]/,"")} {print}'
 
46
 
 
47
sleep 1
 
48
killall Deadwood
 
49
sleep 1
 
50
 
 
51
done
 
52
 
 
53
# Clean up
 
54
killall maradns
 
55
rm mararc
 
56
rm db.example.com
 
57
rm dwood2rc