]>
git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.nobackend/negcache-tests-dotted-cname/pipe.py
0d4e52d78e4bdb11b91c0e52c3f74f6a0a944a6c
1 #!/usr/bin/env python2.7 -u
5 line
= sys
.stdin
.readline()
7 print('OK\tTest backend firing up')
10 line
= sys
.stdin
.readline()
11 items
= line
.split('\t')
12 sys
.stderr
.write(line
)
14 print('LOG\tGot an unparseable line')
15 print('LOG\t%s' % line
)
19 what
, qname
, qclass
, qtype
, id, ip
= items
21 if qtype
in ['SOA', 'ANY'] and qname
== 'example2.com':
22 print('DATA\t%s\t%s\tSOA\t300\t-1\tns1.example.com ahu.example.com 2008080300 1800 3600 604800 3600' % (qname
, qclass
))
24 if qtype
in ['NS', 'ANY'] and qname
== 'example2.com':
25 print('DATA\t%s\t%s\tNS\t3600\t-1\tns1.example.com' % (qname
, qclass
))
26 print('DATA\t%s\t%s\tNS\t3600\t-1\tns2.example.com' % (qname
, qclass
))
28 if qtype
in ['A', 'ANY'] and qname
.endswith('example2.com'):
29 # We were asked a specific record
30 print('DATA\t%s\t%s\tCNAME\t3600\t-1\twww.example.com.' % (qname
, qclass
))