From: Mukund Sivaraman Date: Mon, 3 Feb 2014 05:23:01 +0000 (+0530) Subject: [2430] Add lettuce test for $GENERATE X-Git-Tag: bind10-1.2.0beta1-release~50^2~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34802a0ac819bc875d6f980407e090320130ffe3;p=thirdparty%2Fkea.git [2430] Add lettuce test for $GENERATE --- diff --git a/tests/lettuce/configurations/.gitignore b/tests/lettuce/configurations/.gitignore index db54954fb3..50013a55ed 100644 --- a/tests/lettuce/configurations/.gitignore +++ b/tests/lettuce/configurations/.gitignore @@ -1,3 +1,4 @@ /bindctl_commands.config /example.org.config +/generate.config /root.config diff --git a/tests/lettuce/configurations/generate.config.orig b/tests/lettuce/configurations/generate.config.orig new file mode 100644 index 0000000000..a40d8c21d8 --- /dev/null +++ b/tests/lettuce/configurations/generate.config.orig @@ -0,0 +1,35 @@ +{ + "version": 3, + "Logging": { + "loggers": [{ + "severity": "DEBUG", + "name": "*", + "debuglevel": 99 + }] + }, + "Auth": { + "listen_on": [{ + "port": 56176, + "address": "127.0.0.1" + }] + }, + "data_sources": { + "classes": { + "IN": [ + { + "type": "MasterFiles", + "cache-enable": true, + "params": { + "example.org": "data/generate.zone" + } + } + ] + } + }, + "Init": { + "components": { + "b10-auth": { "kind": "needed", "special": "auth" }, + "b10-cmdctl": { "special": "cmdctl", "kind": "needed" } + } + } +} diff --git a/tests/lettuce/data/generate.zone b/tests/lettuce/data/generate.zone new file mode 100644 index 0000000000..4ea08db4e2 --- /dev/null +++ b/tests/lettuce/data/generate.zone @@ -0,0 +1,6 @@ +$ORIGIN example.org. +example.org. 3600 IN SOA ns1.example.org. admin.example.org. 12341 3600 1800 2419200 7200 +example.org. 3600 IN NS ns1.example.org. +example.org. 3600 IN NS ns2.example.org. + +$GENERATE 1-4 host$ A 192.0.2.$ diff --git a/tests/lettuce/features/master_loader.feature b/tests/lettuce/features/master_loader.feature new file mode 100644 index 0000000000..82710747ab --- /dev/null +++ b/tests/lettuce/features/master_loader.feature @@ -0,0 +1,43 @@ +Feature: Master loader feature + This feature is a collection of tests for the zone file loader in + BIND 10. + + Scenario: $GENERATE support + Given I have bind10 running with configuration generate.config + And wait for bind10 stderr message BIND10_STARTED_CC + And wait for bind10 stderr message CMDCTL_STARTED + And wait for bind10 stderr message AUTH_SERVER_STARTED + + bind10 module Auth should be running + And bind10 module Resolver should not be running + And bind10 module Xfrout should not be running + And bind10 module Zonemgr should not be running + And bind10 module Xfrin should not be running + And bind10 module Stats should not be running + And bind10 module StatsHttpd should not be running + + A query for www.example.org should have rcode NXDOMAIN + The SOA serial for example.org should be 12341 + + A query for host0.example.org should have rcode NXDOMAIN + A query for host1.example.org should have rcode NOERROR + The answer section of the last query response should be + """ + host1.example.org. 3600 IN A 192.0.2.1 + """ + A query for host2.example.org should have rcode NOERROR + The answer section of the last query response should be + """ + host2.example.org. 3600 IN A 192.0.2.2 + """ + A query for host3.example.org should have rcode NOERROR + The answer section of the last query response should be + """ + host3.example.org. 3600 IN A 192.0.2.3 + """ + A query for host4.example.org should have rcode NOERROR + The answer section of the last query response should be + """ + host4.example.org. 3600 IN A 192.0.2.4 + """ + A query for host5.example.org should have rcode NXDOMAIN diff --git a/tests/lettuce/features/terrain/terrain.py b/tests/lettuce/features/terrain/terrain.py index 66727bf7ec..f20dfc899c 100644 --- a/tests/lettuce/features/terrain/terrain.py +++ b/tests/lettuce/features/terrain/terrain.py @@ -52,6 +52,8 @@ copylist = [ "configurations/bindctl_commands.config"], ["configurations/example.org.config.orig", "configurations/example.org.config"], + ["configurations/generate.config.orig", + "configurations/generate.config"], ["configurations/bindctl/bindctl.config.orig", "configurations/bindctl/bindctl.config"], ["configurations/auth/auth_basic.config.orig",