Browse Source

[1461] add more log checks to ddns systest

also fix one; the module tests were supposed to serve the zone from memory
Jelte Jansen 13 years ago
parent
commit
f2cd12cb26

+ 1 - 1
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:

+ 4 - 4
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.

+ 13 - 0
tests/lettuce/configurations/ddns/noddns.config.orig

@@ -17,6 +17,19 @@
                 "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": {

+ 12 - 4
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