~ubuntu-branches/ubuntu/raring/maradns/raring

« back to all changes in this revision

Viewing changes to deadwood-2.4.10/sqa/sqa_cname_chain/do.test

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2010-01-24 12:17:40 UTC
  • mfrom: (1.1.13 upstream) (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100124121740-a4e1fjobwaouz443
Tags: 1.4.02-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
killall maradns > /dev/null 2>&1 # Don't run this test on Solaris
 
4
sleep 2
 
5
 
 
6
for IP in 127.0.0.2 ; do
 
7
cat > mararc-${IP} << EOF
 
8
chroot_dir="$( pwd )"
 
9
ipv4_bind_addresses="${IP}"
 
10
csv2 = {}
 
11
csv2["example.com."] = "db.example.com"
 
12
EOF
 
13
 
 
14
cat > db.example.com << EOF
 
15
www1.% CNAME foo.%
 
16
www2.% CNAME foo.%
 
17
foo.% +60 10.1.2.3
 
18
EOF
 
19
 
 
20
# OK, test the server
 
21
../../../server/maradns -f mararc-${IP} > /dev/null 2>&1 &
 
22
#../../../server/maradns -f mararc-${IP} &
 
23
sleep 1
 
24
 
 
25
done
 
26
 
 
27
# Now, make sure Deadwood works
 
28
 
 
29
cat > dwood2rc << EOF
 
30
chroot_dir="$( pwd )"
 
31
ipv4_bind_addresses="127.0.0.1"
 
32
upstream_servers = {}
 
33
upstream_servers["."]="127.0.0.2"
 
34
recursive_acl="127.0.0.1/16"
 
35
resurrections = 0
 
36
EOF
 
37
 
 
38
../../src/Deadwood -f dwood2rc > /dev/null &
 
39
sleep 1
 
40
askmara Awww1.example.com. 127.0.0.1
 
41
echo
 
42
askmara Awww1.example.com. 127.0.0.1
 
43
echo
 
44
askmara Awww2.example.com. 127.0.0.1
 
45
 
 
46
killall maradns
 
47
# Make sure that CNAME stays in the cache for only 60 seconds
 
48
sleep 70
 
49
echo
 
50
askmara Awww1.example.com. 127.0.0.1
 
51
 
 
52
killall Deadwood
 
53
rm mararc-*
 
54
rm db.example.com
 
55
rm dwood2rc