BIND 10 trac1461, updated. f2cd12cb26e8e2908de811d179c48660cd000d8d [1461] add more log checks to ddns systest
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jun 15 13:02:33 UTC 2012
The branch, trac1461 has been updated
via f2cd12cb26e8e2908de811d179c48660cd000d8d (commit)
via c54635af6106f737f791558f1a7b8a415647e6bf (commit)
via fa2055dc9dc9da332361f402408669c3d9203374 (commit)
from 9ac04cd9c7f56f2ff12344f218a1bac8ab671f14 (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 f2cd12cb26e8e2908de811d179c48660cd000d8d
Author: Jelte Jansen <jelte at isc.org>
Date: Fri Jun 15 14:56:24 2012 +0200
[1461] add more log checks to ddns systest
also fix one; the module tests were supposed to serve the zone from memory
commit c54635af6106f737f791558f1a7b8a415647e6bf
Author: Jelte Jansen <jelte at isc.org>
Date: Fri Jun 15 14:09:22 2012 +0200
[1461] move start/stop ddns steps to bind10_control.py
commit fa2055dc9dc9da332361f402408669c3d9203374
Author: Jelte Jansen <jelte at isc.org>
Date: Fri Jun 15 14:07:41 2012 +0200
[1461] make test config files multiline
-----------------------------------------------------------------------
Summary of changes:
src/bin/ddns/ddns.py.in | 2 +-
src/bin/ddns/ddns_messages.mes | 8 +-
tests/lettuce/configurations/ddns/ddns.config.orig | 79 +++++++++++++++++++-
.../lettuce/configurations/ddns/noddns.config.orig | 43 ++++++++++-
tests/lettuce/features/ddns_system.feature | 16 +++-
tests/lettuce/features/example.feature | 1 -
tests/lettuce/features/terrain/bind10_control.py | 29 +++++++
tests/lettuce/features/terrain/nsupdate.py | 28 -------
8 files changed, 166 insertions(+), 40 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index 4f7903a..c9669c9 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -508,7 +508,7 @@ class DDNSServer:
Get and process all commands sent from cfgmgr or other modules.
This loops waiting for events until self.shutdown() has been called.
'''
- logger.info(DDNS_RUNNING)
+ logger.info(DDNS_STARTED)
cc_fileno = self._cc.get_socket().fileno()
listen_fileno = self._listen_socket.fileno()
while not self._shutdown:
diff --git a/src/bin/ddns/ddns_messages.mes b/src/bin/ddns/ddns_messages.mes
index aa26059..1b7ca87 100644
--- a/src/bin/ddns/ddns_messages.mes
+++ b/src/bin/ddns/ddns_messages.mes
@@ -113,10 +113,6 @@ case, there may not be able to do anything to fix it at the server
side, but the administrator may want to check the general reachability
with the client address.
-% DDNS_RUNNING ddns server is running and listening for updates
-The ddns process has successfully started and is now ready to receive commands
-and updates.
-
% DDNS_SESSION session arrived on file descriptor %1
A debug message, informing there's some activity on the given file descriptor.
It will be either a request or the file descriptor will be closed. See
@@ -127,6 +123,10 @@ The ddns process is shutting down. It will no longer listen for new commands
or updates. Any command or update that is being addressed at this moment will
be completed, after which the process will exit.
+% DDNS_STARTED ddns server is running and listening for updates
+The ddns process has successfully started and is now ready to receive commands
+and updates.
+
% DDNS_STOPPED ddns server has stopped
The ddns process has successfully stopped and is no longer listening for or
handling commands or updates, and will now exit.
diff --git a/tests/lettuce/configurations/ddns/ddns.config.orig b/tests/lettuce/configurations/ddns/ddns.config.orig
index b1883ce..80b92f7 100644
--- a/tests/lettuce/configurations/ddns/ddns.config.orig
+++ b/tests/lettuce/configurations/ddns/ddns.config.orig
@@ -1 +1,78 @@
-{"Logging": {"loggers": [{"debuglevel": 99, "severity": "DEBUG", "name": "*"}]}, "Zonemgr": {"secondary_zones": [{"class": "IN", "name": "secondary.org"}]}, "Auth": {"database_file": "data/ddns/example.org.sqlite3", "listen_on": [{"port": 47806, "address": "127.0.0.1"}]}, "Boss": {"components": {"b10-xfrout": {"kind": "dispensable", "address": "Xfrout"}, "b10-zonemgr": {"kind": "dispensable", "address": "ZoneMgr"}, "b10-ddns": {"kind": "dispensable", "address": "DDNS"}, "b10-auth": {"kind": "needed", "special": "auth"}, "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}}}, "version": 2, "DDNS": {"zones": [{"origin": "example.org.", "update_acl": [{"action": "ACCEPT", "from": "127.0.0.1"}], "class": "IN"}, {"origin": "secondary.org.", "update_acl": [{"action": "ACCEPT", "from": "127.0.0.1"}], "class": "IN"}]}}
+{
+ "version": 2,
+ "Logging": {
+ "loggers": [
+ {
+ "debuglevel": 99,
+ "severity": "DEBUG",
+ "name": "*"
+ }
+ ]
+ },
+ "Zonemgr": {
+ "secondary_zones": [
+ {
+ "class": "IN",
+ "name": "secondary.org"
+ }
+ ]
+ },
+ "Auth": {
+ "database_file": "data/ddns/example.org.sqlite3",
+ "listen_on": [
+ {
+ "port": 47806,
+ "address":
+ "127.0.0.1"
+ }
+ ]
+ },
+ "Boss": {
+ "components": {
+ "b10-xfrout": {
+ "kind": "dispensable",
+ "address": "Xfrout"
+ },
+ "b10-zonemgr": {
+ "kind": "dispensable",
+ "address": "ZoneMgr"
+ },
+ "b10-ddns": {
+ "kind": "dispensable",
+ "address": "DDNS"
+ },
+ "b10-auth": {
+ "kind": "needed",
+ "special": "auth"
+ },
+ "b10-cmdctl": {
+ "kind": "needed",
+ "special": "cmdctl"
+ }
+ }
+ },
+ "DDNS": {
+ "zones": [
+ {
+ "origin": "example.org.",
+ "update_acl": [
+ {
+ "action": "ACCEPT",
+ "from": "127.0.0.1"
+ }
+ ],
+ "class": "IN"
+ },
+ {
+ "origin": "secondary.org.",
+ "update_acl": [
+ {
+ "action": "ACCEPT",
+ "from": "127.0.0.1"
+ }
+ ],
+ "class": "IN"
+ }
+ ]
+ }
+}
diff --git a/tests/lettuce/configurations/ddns/noddns.config.orig b/tests/lettuce/configurations/ddns/noddns.config.orig
index e44ea4d..2b13d0e 100644
--- a/tests/lettuce/configurations/ddns/noddns.config.orig
+++ b/tests/lettuce/configurations/ddns/noddns.config.orig
@@ -1 +1,42 @@
-{"version": 2, "Logging": {"loggers": [{"severity": "DEBUG", "name": "*", "debuglevel": 99}]}, "DDNS": {"zones": []}, "Auth": {"database_file": "data/ddns/example.org.sqlite3", "listen_on": [{"port": 47806, "address": "127.0.0.1"}]}, "Boss": {"components": {"b10-xfrout": {"kind": "dispensable"}, "b10-auth": {"kind": "needed", "special": "auth"}, "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}}}}
+{
+ "version": 2,
+ "Logging": {
+ "loggers": [
+ {
+ "severity": "DEBUG",
+ "name": "*",
+ "debuglevel": 99
+ }
+ ]
+ },
+ "DDNS": {"zones": []},
+ "Auth": {
+ "database_file": "data/ddns/example.org.sqlite3",
+ "listen_on": [
+ {
+ "port": 47806,
+ "address": "127.0.0.1"
+ }
+ ],
+ "datasources": [
+ {
+ "type": "memory",
+ "class": "IN",
+ "zones": [
+ {
+ "origin": "example.org",
+ "filetype": "sqlite3",
+ "file": "data/ddns/example.org.sqlite3"
+ }
+ ]
+ }
+ ]
+ },
+ "Boss": {
+ "components": {
+ "b10-xfrout": {"kind": "dispensable"},
+ "b10-auth": {"kind": "needed", "special": "auth"},
+ "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}
+ }
+ }
+}
diff --git a/tests/lettuce/features/ddns_system.feature b/tests/lettuce/features/ddns_system.feature
index 9585f7a..327ef96 100644
--- a/tests/lettuce/features/ddns_system.feature
+++ b/tests/lettuce/features/ddns_system.feature
@@ -20,7 +20,7 @@ Feature: DDNS System
# Test 2
When I configure bind10 to run DDNS
- And wait for new bind10 stderr message DDNS_RUNNING
+ And wait for new bind10 stderr message DDNS_STARTED
bind10 module DDNS should be running
# Test 3
@@ -39,14 +39,18 @@ Feature: DDNS System
# Test 5
When I use DDNS to set the SOA serial to 1237
+ # also check if Auth server reloaded
+ And wait for new bind10 stderr message AUTH_LOAD_ZONE
The DDNS response should be SUCCESS
And the SOA serial for example.org should be 1237
# Test 6
When I send bind10 the command DDNS shutdown
+ And wait for new bind10 stderr message DDNS_STOPPED
# Test 7
- And wait for new bind10 stderr message DDNS_RUNNING
+ # BoB should restart it
+ And wait for new bind10 stderr message DDNS_STARTED
# Test 8
# Known issue: after shutdown, first new attempt results in SERVFAIL
@@ -55,15 +59,19 @@ Feature: DDNS System
And the SOA serial for example.org should be 1237
When I use DDNS to set the SOA serial to 1238
+ And wait for new bind10 stderr message AUTH_LOAD_ZONE
The DDNS response should be SUCCESS
And the SOA serial for example.org should be 1238
# Test 9
When I send bind10 the command Auth shutdown
+ And wait for new bind10 stderr message AUTH_SHUTDOWN
+ # BoB should restart it automatically
And wait for new bind10 stderr message AUTH_SERVER_STARTED
# Test 10
When I use DDNS to set the SOA serial to 1239
+ And wait for new bind10 stderr message AUTH_LOAD_ZONE
The DDNS response should be SUCCESS
And the SOA serial for example.org should be 1239
@@ -83,7 +91,7 @@ Feature: DDNS System
Given I have bind10 running with configuration ddns/ddns.config
And wait for bind10 stderr message BIND10_STARTED_CC
And wait for bind10 stderr message AUTH_SERVER_STARTED
- And wait for bind10 stderr message DDNS_RUNNING
+ And wait for bind10 stderr message DDNS_STARTED
# Sanity check
A query for new1.example.org should have rcode NXDOMAIN
@@ -119,7 +127,7 @@ Feature: DDNS System
# When I start bind10 with configuration ddns/primary.config as primary
# And wait for primary stderr message AUTH_SERVER_STARTED
# And wait for primary stderr message XFROUT_STARTED
- # And wait for primary stderr message DDNS_RUNNING
+ # And wait for primary stderr message DDNS_STARTED
# And I start bind10 with configuration example2.org.config with cmdctl port 47804 as secondary
# And wait for secondary stderr message AUTH_SERVER_STARTED
diff --git a/tests/lettuce/features/example.feature b/tests/lettuce/features/example.feature
index cac5d69..685cf8b 100644
--- a/tests/lettuce/features/example.feature
+++ b/tests/lettuce/features/example.feature
@@ -191,4 +191,3 @@ Feature: Example feature
A query for www.example.org to 127.0.0.1:47806 should have rcode REFUSED
A query for www.example.org to [::1]:47807 should have rcode NOERROR
-
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index 5639fe2..a08a887 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -334,3 +334,32 @@ def module_is_running(step, name, not_str):
not_str = ""
step.given('send bind10 the command help')
step.given('last bindctl output should' + not_str + ' contain ' + name + ' exactly')
+
+ at step('Configure BIND10 to run DDNS')
+def configure_ddns_on(step):
+ """
+ Convenience compound step to enable the b10-ddns module.
+ """
+ step.behave_as("""
+ When I send bind10 the following commands
+ \"\"\"
+ config add Boss/components b10-ddns
+ config set Boss/components/b10-ddns/kind dispensable
+ config set Boss/components/b10-ddns/address DDNS
+ config commit
+ \"\"\"
+ """)
+
+ at step('Configure BIND10 to stop running DDNS')
+def configure_ddns_off(step):
+ """
+ Convenience compound step to disable the b10-ddns module.
+ """
+ step.behave_as("""
+ When I send bind10 the following commands
+ \"\"\"
+ config remove Boss/components b10-ddns
+ config commit
+ \"\"\"
+ """)
+
diff --git a/tests/lettuce/features/terrain/nsupdate.py b/tests/lettuce/features/terrain/nsupdate.py
index 402d29e..946439d 100644
--- a/tests/lettuce/features/terrain/nsupdate.py
+++ b/tests/lettuce/features/terrain/nsupdate.py
@@ -134,34 +134,6 @@ def run_ddns_update(step):
"""
run_nsupdate(world.nsupdate_commands)
- at step('Configure BIND10 to run DDNS')
-def configure_ddns_on(step):
- """
- Convenience compound step to enable the b10-ddns module.
- """
- step.behave_as("""
- When I send bind10 the following commands
- \"\"\"
- config add Boss/components b10-ddns
- config set Boss/components/b10-ddns/kind dispensable
- config set Boss/components/b10-ddns/address DDNS
- config commit
- \"\"\"
- """)
-
- at step('Configure BIND10 to stop running DDNS')
-def configure_ddns_off(step):
- """
- Convenience compound step to disable the b10-ddns module.
- """
- step.behave_as("""
- When I send bind10 the following commands
- \"\"\"
- config remove Boss/components b10-ddns
- config commit
- \"\"\"
- """)
-
@step('use DDNS to set the SOA SERIAL to ([0-9]+)')
def set_serial_to(step, new_serial):
"""
More information about the bind10-changes
mailing list