]> git.ipfire.org Git - thirdparty/pdns.git/blame - regression-tests.nobackend/negcache-tests-dotted-cname/pipe.py
profile.rst: Remove GOST
[thirdparty/pdns.git] / regression-tests.nobackend / negcache-tests-dotted-cname / pipe.py
CommitLineData
411869d9 1#!/usr/bin/env python
48b10621
PL
2
3import sys
4
5line = sys.stdin.readline()
6# TOLO
effe7572 7print('OK\tTest backend firing up')
48b10621
PL
8
9while True:
10 line = sys.stdin.readline()
11 items = line.split('\t')
12 sys.stderr.write(line)
13 if len(items) < 6:
effe7572
PD
14 print('LOG\tGot an unparseable line')
15 print('LOG\t%s' % line)
16 print('END')
48b10621
PL
17 continue
18
19 what, qname, qclass, qtype, id, ip = items
20
21 if qtype in ['SOA', 'ANY'] and qname == 'example2.com':
effe7572 22 print('DATA\t%s\t%s\tSOA\t300\t-1\tns1.example.com ahu.example.com 2008080300 1800 3600 604800 3600' % (qname, qclass))
48b10621
PL
23
24 if qtype in ['NS', 'ANY'] and qname == 'example2.com':
effe7572
PD
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))
48b10621
PL
27
28 if qtype in ['A', 'ANY'] and qname.endswith('example2.com'):
29 # We were asked a specific record
effe7572 30 print('DATA\t%s\t%s\tCNAME\t3600\t-1\twww.example.com.' % (qname, qclass))
48b10621 31
effe7572 32 print('END')