BIND 10 trac2430, updated. 34802a0ac819bc875d6f980407e090320130ffe3 [2430] Add lettuce test for $GENERATE
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Feb 3 05:23:55 UTC 2014
The branch, trac2430 has been updated
via 34802a0ac819bc875d6f980407e090320130ffe3 (commit)
from 4760ac62312e9b5bf24ba73d67b859e6cb3fd61d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 34802a0ac819bc875d6f980407e090320130ffe3
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Feb 3 10:53:01 2014 +0530
[2430] Add lettuce test for $GENERATE
-----------------------------------------------------------------------
Summary of changes:
tests/lettuce/configurations/.gitignore | 1 +
.../{glue.config => generate.config.orig} | 5 ++-
tests/lettuce/data/generate.zone | 6 +++
tests/lettuce/features/master_loader.feature | 43 ++++++++++++++++++++
tests/lettuce/features/terrain/terrain.py | 2 +
5 files changed, 55 insertions(+), 2 deletions(-)
copy tests/lettuce/configurations/{glue.config => generate.config.orig} (81%)
create mode 100644 tests/lettuce/data/generate.zone
create mode 100644 tests/lettuce/features/master_loader.feature
-----------------------------------------------------------------------
diff --git a/tests/lettuce/configurations/.gitignore b/tests/lettuce/configurations/.gitignore
index db54954..50013a5 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 0000000..a40d8c2
--- /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 0000000..4ea08db
--- /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 0000000..8271074
--- /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 66727bf..f20dfc8 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",
More information about the bind10-changes
mailing list