Browse Source

[2562] update notifyWithoutSession test for the case where zonemgr not running.

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.
JINMEI Tatuya 12 years ago
parent
commit
cdb550b4be
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/bin/auth/tests/auth_srv_unittest.cc

+ 4 - 2
src/bin/auth/tests/auth_srv_unittest.cc

@@ -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"),