summaryrefslogtreecommitdiffabout
path: root/tests/parser-bind.at
Unidiff
Diffstat (limited to 'tests/parser-bind.at') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/parser-bind.at95
1 files changed, 95 insertions, 0 deletions
diff --git a/tests/parser-bind.at b/tests/parser-bind.at
new file mode 100644
index 0000000..b7ae3e1
--- a/dev/null
+++ b/tests/parser-bind.at
@@ -0,0 +1,95 @@
1# This file is part of grecs -*- Autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff
3#
4# Grecs is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Grecs is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16
17AT_SETUP([BIND-style parser])
18AT_KEYWORDS([parser bind])
19
20AT_CHECK([gcffmt -type=bind -I$abs_srcdir $abs_srcdir/bind.conf|sed 's/ *$//'],
21[0],
22[.acl="upd-dyn-vpn".key: "vpn."
23.acl="upd-dyn-vpn".10.11.0.1:
24.acl="upd-dyn-vpn".10.10.0.1:
25.acl="foo-acl".key: "foo."
26.options.version: "Grecs testsuite"
27.options.coresize: "0"
28.options.directory: "/etc/namedb"
29.options.pid-file: "/var/log/bind/named.pid"
30.options.allow-transfer.foo-acl:
31.options.allow-query.any:
32.options.serial-query-rate: "5"
33.options.max-journal-size: "5m"
34.options.check-names: "master" "warn"
35.options.check-names: "slave" "warn"
36.options.check-names: "response" "ignore"
37.logging.channel="default_channel".file: "/var/log/bind/named.log" "versions" "9" "size" "524288"
38.logging.channel="default_channel".print-time: "yes"
39.logging.channel="default_channel".print-severity: "yes"
40.logging.channel="debug_channel".file: "/var/log/bind/named.run" "versions" "9" "size" "524288"
41.logging.channel="debug_channel".print-time: "yes"
42.logging.channel="debug_channel".print-severity: "yes"
43.logging.channel="debug_channel".severity: "dynamic"
44.logging.channel="security_channel".file: "/var/log/bind/security" "versions" "9" "size" "524288"
45.logging.channel="security_channel".print-time: "yes"
46.logging.channel="security_channel".print-severity: "yes"
47.logging.channel="xfer_in_channel".file: "/var/log/bind/named-xfer.in" "versions" "9" "size" "524288"
48.logging.channel="xfer_in_channel".print-time: "yes"
49.logging.channel="xfer_out_channel".file: "/var/log/bind/named-xfer.out" "versions" "9" "size" "524288"
50.logging.channel="xfer_out_channel".print-time: "yes"
51.logging.channel="lamers_channel".file: "/var/log/bind/lamers.log" "versions" "5" "size" "524288"
52.logging.channel="lamers_channel".print-time: "yes"
53.logging.channel="lamers_channel".print-category: "yes"
54.logging.channel="update_channel".file: "/var/log/bind/update.log" "versions" "9" "size" "524288"
55.logging.channel="update_channel".print-time: "yes"
56.logging.channel="update_channel".print-category: "yes"
57.logging.channel="update_channel".severity: "debug" "5"
58.logging.channel="notify_channel".file: "/var/log/bind/notify.log" "versions" "9" "size" "524288"
59.logging.channel="notify_channel".print-time: "yes"
60.logging.channel="notify_channel".print-category: "yes"
61.logging.channel="query_channel".file: "/var/log/bind/query.log" "versions" "9" "size" "524288"
62.logging.channel="query_channel".print-time: "yes"
63.logging.category="security".security_channel:
64.logging.category="queries".null:
65.logging.category="default".default_channel:
66.logging.category="default".debug_channel:
67.logging.category="xfer-in".xfer_in_channel:
68.logging.category="xfer-out".xfer_out_channel:
69.logging.category="delegation-only".lamers_channel:
70.logging.category="lame-servers".lamers_channel:
71.logging.category="update".update_channel:
72.logging.category="notify".notify_channel:
73.key="rndc-key".algorithm: "hmac-md5"
74.key="rndc-key".secret: "1111111111111111111111=="
75.controls.inet: "127.0.0.1" "port" "953" "allow" ("127.0.0.1") "keys" ("rndc-key")
76.view="internal".match-clients.10.0.0.0/8:
77.view="internal".zone="int".type: "master"
78.view="internal".zone="int".file: "int.p"
79.view="internal".zone="int".allow-update.upd-dyn-vpn:
80.view="internal".zone="int".allow-query.internal-hosts:
81.view="internal".zone="int".allow-transfer.10.11.0.1:
82.view="internal".zone="int".allow-transfer.10.10.0.4:
83.view="internal".zone="int".allow-transfer.127.0.0.1:
84.view="external".zone=".".type: "hint"
85.view="external".zone=".".file: "named.root"
86.view="external".zone="com".type: "delegation-only"
87.view="external".zone="net".type: "delegation-only"
88.view="external".zone="0.0.127.IN-ADDR.ARPA".type: "master"
89.view="external".zone="0.0.127.IN-ADDR.ARPA".file: "local.p"
90.view="external".zone="foo.example.net".type: "master"
91.view="external".zone="foo.example.net".file: "foo.p"
92.view="external".dlz="DLZ".database: "mysql\n {host=localhost socket=/var/run/mysql/mysql.sock dbname=Foo user=bind ssl=false}\n {select r.zone from dns_soa r, dns_acl a where r.zone = '%zone%'\n and a.network <= inet_aton('%client%') and inet_aton('%client%') <=\n a.bcast\n and a.view = r.view }\n {select r.ttl, r.type, r.mx_priority,\n case when r.type='TXT' then concat('\"', r.data, '\"') else r.data end\n from dns_records r, dns_acl a,\n where r.zone = '%zone%' and r.host = '%record%'\n and not (r.type = 'SOA' or r.type = 'NS')\n and a.network <= inet_aton('%client%') and inet_aton('%client%') <=\n a.bcast\n and a.view = r.view }\n {select r.ttl, r.type, r.data, r.resp_person, r.serial,\n r.refresh, r.retry, r.expire, r.minimum\n from dns_soa r, dns_acl a where r.zone = '%zone%'\n and (r.type = 'SOA' or r.type='NS')\n and a.network <= inet_aton('%client%') and\n inet_aton('%client%') <= a.bcast\n and a.view = r.view }\n {select r.ttl, r.type, r.host, r.mx_priority, case when r.type='TXT' then\n concat('\"', r.data, '\"') else r.data end\n from dns_records r, dns_acl a where r.zone = '%zone%' \n and a.network <= inet_aton('%client%') and\n inet_aton('%client%') <= a.bcast\n and a.view = r.view }\n {select zone from dns_xfr where zone = '%zone%' and client = '%client%'}"
93])
94
95AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.