]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2562] update notifyWithoutSession test for the case where zonemgr not running.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 27 Mar 2013 06:27:38 +0000 (23:27 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 27 Mar 2013 06:27:38 +0000 (23:27 -0700)
resetting "xfrin session" to NULL doesn't make much sense because it shouldn't
happen in production case, so I simply updated the existing test case
(and renamed it) rather than adding a new one.

src/bin/auth/tests/auth_srv_unittest.cc

index 931d1e25fada9cdd1928719e91b8e27a7aa4338e..a478f4b746559475e6485518c470f2f62f3a7987 100644 (file)
@@ -868,10 +868,12 @@ TEST_F(AuthSrvTest, notifyWithErrorRcode) {
                 Opcode::NOTIFY().getCode(), QR_FLAG | AA_FLAG, 1, 0, 0, 0);
 }
 
-TEST_F(AuthSrvTest, notifyWithoutSession) {
+TEST_F(AuthSrvTest, notifyWithoutRecipient) {
     updateInMemory(server, "example.", CONFIG_INMEMORY_EXAMPLE, false);
 
-    server.setXfrinSession(NULL);
+    // Emulate the case where msgq tells auth there's no Zonemgr module.
+    notify_session.setMessage(isc::config::createAnswer(CC_REPLY_NO_RECPT,
+                                                        "no recipient"));
 
     UnitTestUtil::createRequestMessage(request_message, Opcode::NOTIFY(),
                                        default_qid, Name("example"),