Browse Source

[1553] Added resolver_basic feature test

Jelte Jansen 13 years ago
parent
commit
cf8e3900e4

+ 1 - 0
tests/lettuce/configurations/resolver/resolver_basic.config

@@ -0,0 +1 @@
+{"version": 2, "Resolver": {"listen_on": [{"port": 47806, "address": "127.0.0.1"}]}, "Boss": {"components": {"b10-resolver": {"kind": "needed"}, "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}}}}

+ 16 - 0
tests/lettuce/features/resolver_basic.feature

@@ -0,0 +1,16 @@
+Feature: Basic Resolver
+    This feature set is just testing the execution of the b10-resolver
+    module. It sees whether it starts up, takes configuration, and
+    answers queries.
+    
+    Scenario: Listen for and answer query
+        # This scenario starts a server that runs a real resolver.
+        # In order not to send out queries into the wild, we only
+        # query for something known to be hardcoded at this moment.
+        # NOTE: once real priming has been implemented, this test needs
+        # to be revised (as it would then leak, which is probably true
+        # for any resolver system test)
+        When I start bind10 with configuration resolver/resolver_basic.config
+        And wait for new bind10 stderr message RESOLVER_STARTED
+        # This answer is currently hardcoded (as part of the fake priming)
+        A query for l.root-servers.net. should have rcode NOERROR

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

@@ -179,7 +179,7 @@ class QueryResult(object):
         """
         pass
 
-@step('A query for ([\w.]+) (?:type ([A-Z0-9]+) )?(?:class ([A-Z]+) )?' +
+@step('A query for ([\w.-]+) (?:type ([A-Z0-9]+) )?(?:class ([A-Z]+) )?' +
       '(?:to ([^:]+)(?::([0-9]+))? )?should have rcode ([\w.]+)')
 def query(step, query_name, qtype, qclass, addr, port, rcode):
     """