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
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
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
+
"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).
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,\