Browse Source

[master] Merge branch 'trac1772'

JINMEI Tatuya 13 years ago
parent
commit
34da803fd8

+ 1 - 1
tests/lettuce/configurations/example2.org.config

@@ -12,7 +12,7 @@
         "database_file": "data/example.org.sqlite3",
         "listen_on": [ {
             "port": 47807,
-            "address": "127.0.0.1"
+            "address": "::1"
         } ]
     }
 }

+ 1 - 1
tests/lettuce/configurations/xfrin/retransfer_master.conf

@@ -11,7 +11,7 @@
         "database_file": "data/example.org.sqlite3",
         "listen_on": [ {
             "port": 47807,
-            "address": "127.0.0.1"
+            "address": "::1"
         } ]
     },
     "Xfrout": {

+ 2 - 2
tests/lettuce/features/example.feature

@@ -133,10 +133,10 @@ Feature: Example feature
         Then wait for bind10 auth of bind10_one to start
         Then wait for bind10 auth of bind10_two to start
         A query for www.example.org to 127.0.0.1:47806 should have rcode NOERROR
-        A query for www.example.org to 127.0.0.1:47807 should have rcode NOERROR
+        A query for www.example.org to [::1]:47807 should have rcode NOERROR
 
         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 127.0.0.1:47807 should have rcode NOERROR
+        A query for www.example.org to [::1]:47807 should have rcode NOERROR

+ 2 - 1
tests/lettuce/features/terrain/querying.py

@@ -201,7 +201,7 @@ class QueryResult(object):
         pass
 
 @step('A (dnssec )?query for ([\S]+) (?:type ([A-Z0-9]+) )?' +
-      '(?:class ([A-Z]+) )?(?:to ([^:]+)(?::([0-9]+))? )?' +
+      '(?:class ([A-Z]+) )?(?:to ([^:]+|\[[0-9a-fA-F:]+\])(?::([0-9]+))? )?' +
       'should have rcode ([\w.]+)')
 def query(step, dnssec, query_name, qtype, qclass, addr, port, rcode):
     """
@@ -223,6 +223,7 @@ def query(step, dnssec, query_name, qtype, qclass, addr, port, rcode):
         qclass = "IN"
     if addr is None:
         addr = "127.0.0.1"
+    addr = re.sub(r"\[(.+)\]", r"\1", addr) # convert [IPv6_addr] to IPv6_addr
     if port is None:
         port = 47806
     additional_arguments = []

+ 1 - 1
tests/lettuce/features/xfrin_bind10.feature

@@ -6,6 +6,6 @@ Feature: Xfrin
     And I have bind10 running with configuration xfrin/retransfer_slave.conf
     A query for www.example.org should have rcode REFUSED
     Wait for bind10 stderr message CMDCTL_STARTED
-    When I send bind10 the command Xfrin retransfer example.org IN 127.0.0.1 47807
+    When I send bind10 the command Xfrin retransfer example.org IN ::1 47807
     Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
     A query for www.example.org should have rcode NOERROR