Browse Source

[2951] Add lettuce test for non-existing name in root zone from SQLite3

Mukund Sivaraman 11 years ago
parent
commit
6271645f18

+ 1 - 0
tests/lettuce/configurations/.gitignore

@@ -1,2 +1,3 @@
 /bindctl_commands.config
 /example.org.config
+/root.config

+ 40 - 0
tests/lettuce/configurations/root.config.orig

@@ -0,0 +1,40 @@
+{
+    "version": 3,
+    "Logging": {
+        "loggers": [ {
+            "debuglevel": 99,
+            "severity": "DEBUG",
+            "name": "*"
+        } ]
+    },
+    "Auth": {
+        "database_file": "data/root.sqlite3",
+        "listen_on": [ {
+            "port": 47806,
+            "address": "127.0.0.1"
+        } ]
+    },
+    "data_sources": {
+        "classes": {
+            "IN": [
+                {
+                    "type": "sqlite3",
+                    "cache-enable": false,
+                    "params": {
+                        "database_file": "data/root.sqlite3"
+                    }
+                }
+            ]
+        }
+    },
+    "Stats": {
+        "poll-interval": 60
+    },
+    "Init": {
+        "components": {
+            "b10-auth": { "kind": "needed", "special": "auth" },
+            "b10-stats": { "address": "Stats", "kind": "dispensable" },
+            "b10-cmdctl": { "special": "cmdctl", "kind": "needed" }
+        }
+    }
+}

+ 1 - 0
tests/lettuce/data/.gitignore

@@ -1,4 +1,5 @@
 /inmem-xfrin.sqlite3
+/root.sqlite3
 /test_nonexistent_db.sqlite3
 /xfrin-before-diffs.sqlite3
 /xfrin-notify.sqlite3

BIN
tests/lettuce/data/root.sqlite3.orig


+ 18 - 0
tests/lettuce/features/queries.feature

@@ -412,3 +412,21 @@ Feature: Querying feature
           | qryauthans    |          2 |
           | qrynxrrset    |          1 |
           | rcode.noerror |          2 |
+
+    Scenario: Querying non-existing name in root zone from sqlite3 should work
+        Given I have bind10 running with configuration root.config
+        And wait for bind10 stderr message BIND10_STARTED_CC
+        And wait for bind10 stderr message CMDCTL_STARTED
+        And wait for bind10 stderr message AUTH_SERVER_STARTED
+
+        bind10 module Auth should be running
+        And bind10 module Stats should be running
+        And bind10 module Resolver should not be running
+        And bind10 module Xfrout should not be running
+        And bind10 module Zonemgr should not be running
+        And bind10 module Xfrin should not be running
+        And bind10 module StatsHttpd should not be running
+
+        A query for . type SOA should have rcode NOERROR
+        A query for nonexistent. type A should have rcode NXDOMAIN
+        Then wait for bind10 stderr message AUTH_SEND_NORMAL_RESPONSE not AUTH_PROCESS_FAIL

+ 4 - 0
tests/lettuce/features/terrain/terrain.py

@@ -76,8 +76,12 @@ copylist = [
      "configurations/xfrin/retransfer_slave.conf"],
     ["configurations/xfrin/retransfer_slave_notify.conf.orig",
      "configurations/xfrin/retransfer_slave_notify.conf"],
+    ["configurations/root.config.orig",
+     "configurations/root.config"],
     ["data/inmem-xfrin.sqlite3.orig",
      "data/inmem-xfrin.sqlite3"],
+    ["data/root.sqlite3.orig",
+     "data/root.sqlite3"],
     ["data/xfrin-before-diffs.sqlite3.orig",
      "data/xfrin-before-diffs.sqlite3"],
     ["data/xfrin-notify.sqlite3.orig",