Browse Source

[1856] Use a dummy database_file for lettuce multi_instance test

Mukund Sivaraman 13 years ago
parent
commit
bd2568ebde

+ 24 - 1
tests/lettuce/configurations/multi_instance/multi_auth.config.orig

@@ -1 +1,24 @@
-{"version": 2, "Logging": {"loggers": [{"severity": "DEBUG", "name": "*", "debuglevel": 99}]}, "Auth": {"listen_on": [{"port": 47806, "address": "0.0.0.0"}]}, "Boss": {"components": {"b10-auth-2": {"kind": "dispensable", "special": "auth"}, "b10-auth": {"kind": "dispensable", "special": "auth"}, "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}}}}
+{
+    "version": 2,
+    "Logging": {
+        "loggers": [ {
+            "debuglevel": 99,
+            "severity": "DEBUG",
+            "name": "*"
+        } ]
+    },
+    "Auth": {
+        "database_file": "data/test_nonexistent_db.sqlite3",
+        "listen_on": [ {
+            "port": 47806,
+            "address": "127.0.0.1"
+        } ]
+    },
+    "Boss": {
+        "components": {
+            "b10-auth-2": {"kind": "dispensable", "special": "auth"},
+            "b10-auth": {"kind": "dispensable", "special": "auth"},
+            "b10-cmdctl": {"kind": "needed", "special": "cmdctl"}
+        }
+    }
+}

+ 7 - 0
tests/lettuce/features/multi_instance.feature

@@ -3,6 +3,10 @@ Feature: Multiple instances
     removing them does not affect the running of other instances
     removing them does not affect the running of other instances
 
 
     Scenario: Multiple instances of Auth
     Scenario: Multiple instances of Auth
+        # Standard check to test (non-)existence of a file
+        # This file is actually automatically
+        The file data/test_nonexistent_db.sqlite3 should not exist
+
         # This config should have two running instances
         # This config should have two running instances
         Given I have bind10 running with configuration multi_instance/multi_auth.config
         Given I have bind10 running with configuration multi_instance/multi_auth.config
         And wait for bind10 stderr message BIND10_STARTED_CC
         And wait for bind10 stderr message BIND10_STARTED_CC
@@ -21,6 +25,9 @@ Feature: Multiple instances
         And bind10 module Stats should not be running
         And bind10 module Stats should not be running
         And bind10 module StatsHttpd should not be running
         And bind10 module StatsHttpd should not be running
 
 
+        # Now we use the first step again to see if the file has been created
+        The file data/test_nonexistent_db.sqlite3 should exist
+
         A query for example.com should have rcode REFUSED
         A query for example.com should have rcode REFUSED
 
 
         # this also checks whether the process is running
         # this also checks whether the process is running