]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1461] add commented-out ddns-xfrout test
authorJelte Jansen <jelte@isc.org>
Wed, 13 Jun 2012 09:16:28 +0000 (11:16 +0200)
committerJelte Jansen <jelte@isc.org>
Wed, 13 Jun 2012 14:42:15 +0000 (16:42 +0200)
+support for it

tests/lettuce/data/example.org.sqlite3
tests/lettuce/features/ddns_system.feature
tests/lettuce/features/example.feature
tests/lettuce/features/terrain/querying.py

index b6a9c4b0c29a8a3e250413819fea42dfb3f94fcb..f79a4e27f11f69d9cabaebacd8647c636db6e7ed 100644 (file)
Binary files a/tests/lettuce/data/example.org.sqlite3 and b/tests/lettuce/data/example.org.sqlite3 differ
index a7f58559d99fa485f02166b6309eba1ad0d25745..9585f7a375e45268417ab07997a579fefa5675a1 100644 (file)
@@ -80,7 +80,6 @@ Feature: DDNS System
         And the SOA serial for example.org should be 1239
 
     Scenario: ACL
-        # The given config has b10-ddns disabled
         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
@@ -111,3 +110,27 @@ Feature: DDNS System
         The DDNS response should be SUCCESS
         A query for new3.example.org should have rcode NOERROR
         The SOA serial for example.org should be 1236
+
+    #Scenario: DDNS and Xfrout
+    ## Unfortunately, Xfrout can only notify to inzone slaves, and hence only
+    ## to port 53, which we do not want to use for Lettuce tests (for various
+    ## reasons). So for now this test is only an outline, the configs
+    ## themselves have not been set up yet
+    #    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 I start bind10 with configuration example2.org.config with cmdctl port 47804 as secondary
+    #    And wait for secondary stderr message AUTH_SERVER_STARTED
+    #    And wait for secondary stderr message XFRIN_STARTED
+
+    #    # Sanity check
+    #    The SOA serial for example.org should be 1234
+    #    The SOA serial for example.org at 127.0.0.1:47807 should be 1234
+
+    #    When I use DDNS to set the SOA serial to 1235
+    #    The DDNS response should be SUCCESS
+
+    #    The SOA serial for example.org should be 1235
+    #    The SOA serial for example.org at 127.0.0.1:47807 should be 1235
index 9b7c2ca27fa50e69064ecd21d2eebb7edf67da93..cac5d69b38ddf89d650fcf86ead1b2a941c50ad8 100644 (file)
@@ -182,9 +182,13 @@ Feature: Example feature
 
         A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
         A query for www.example.org to [::1]:47807 should have rcode NOERROR
+        The SOA serial for example.org should be 1234
+        The SOA serial for example.org at 127.0.0.1:47806 should be 1234
+        The SOA serial for example.org at ::1:47807 should be 1234
 
         Then set bind10 configuration Auth/database_file to data/empty_db.sqlite3
         And wait for bind10_one stderr message DATASRC_SQLITE_OPEN
 
         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
+
index a5470147aadf39ca98d9923105e74a73d9fc8306..abd7c1805984d308f8e8e6ab2ee5814c9c204cff 100644 (file)
@@ -240,8 +240,8 @@ def query(step, dnssec, query_name, qtype, qclass, addr, port, rcode):
         "Expected: " + rcode + ", got " + query_result.rcode
     world.last_query_result = query_result
 
-@step('The SOA serial for ([\w.]+) should be ([0-9]+)')
-def query_soa(step, query_name, serial):
+@step('The SOA serial for ([\S.]+) (?:at (\S+)(?::([0-9]+)) )?should be ([0-9]+)')
+def query_soa(step, query_name, address, port, serial=None):
     """
     Convenience function to check the SOA SERIAL value of the given zone at
     the nameserver at the default address (127.0.0.1:47806).
@@ -251,7 +251,11 @@ def query_soa(step, query_name, serial):
     If the rcode is not NOERROR, or the answer section does not contain the
     SOA record, this step fails.
     """
-    query_result = QueryResult(query_name, "SOA", "IN", "127.0.0.1", "47806")
+    if address is None:
+        address = "127.0.0.1"
+    if port is None:
+        port = "47806"
+    query_result = QueryResult(query_name, "SOA", "IN", address, port)
     assert "NOERROR" == query_result.rcode,\
         "Got " + query_result.rcode + ", expected NOERROR"
     assert len(query_result.answer_section) == 1,\