Parcourir la source

[trac999] in the defaultQueryACL test, make sure the spec default isn't loaded.

JINMEI Tatuya il y a 14 ans
Parent
commit
ab31e2fbf1
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/bin/resolver/tests/resolver_config_unittest.cc

+ 6 - 0
src/bin/resolver/tests/resolver_config_unittest.cc

@@ -256,6 +256,12 @@ TEST_F(ResolverConfig, defaultQueryACL) {
     EXPECT_EQ(REJECT, server.getQueryACL().execute(createClient("192.0.2.1")));
     EXPECT_EQ(REJECT, server.getQueryACL().execute(
                   createClient("2001:db8::1")));
+
+    // The following would be allowed if the server had loaded the default
+    // configuration from the spec file.  In this context it should not have
+    // happened, and they should be rejected just like the above cases.
+    EXPECT_EQ(REJECT, server.getQueryACL().execute(createClient("127.0.0.1")));
+    EXPECT_EQ(REJECT, server.getQueryACL().execute(createClient("::1")));
 }
 
 TEST_F(ResolverConfig, emptyQueryACL) {