]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5111] Replaced hypen with underscore in command_processed hook name
authorThomas Markwalder <tmark@isc.org>
Tue, 5 Sep 2017 19:55:39 +0000 (15:55 -0400)
committerThomas Markwalder <tmark@isc.org>
Tue, 5 Sep 2017 19:55:39 +0000 (15:55 -0400)
src/lib/config/base_command_mgr.cc
src/lib/config/tests/command_mgr_unittests.cc

index 9d5c46e5471ae274d4f0734d916be0dcb2c9593a..47d7fa3c679c04b08a53223cf5f5bb46965c89b4 100644 (file)
@@ -18,7 +18,7 @@ namespace isc {
 namespace config {
 
 BaseCommandMgr::BaseCommandMgr() {
-    hook_index_command_processed_ = HooksManager::registerHook("command-processed");
+    hook_index_command_processed_ = HooksManager::registerHook("command_processed");
     registerCommand("list-commands", boost::bind(&BaseCommandMgr::listCommandsHandler,
                                                  this, _1, _2));
 }
index fdc334115407670a62822f6635160c1bb36b6e47..4b5d10bb2203e02ca42162128d7d9c8cb8183986 100644 (file)
@@ -465,13 +465,13 @@ TEST_F(CommandMgrTest, unixCreateTooLong) {
                  SocketError);
 }
 
-// This test verifies that a registered callout for the command-processed
+// This test verifies that a registered callout for the command_processed
 // hookpoint is invoked and passed the correct information.
 TEST_F(CommandMgrTest, commandProcessedHook) {
     // Register callout so as we can check that it is called before
     // processing the command by the manager.
     HooksManager::preCalloutsLibraryHandle().registerCallout(
-        "command-processed", command_processed_callout);
+        "command_processed", command_processed_callout);
 
     // Install local handler
     EXPECT_NO_THROW(CommandMgr::instance().registerCommand("my-command",
@@ -494,7 +494,7 @@ TEST_F(CommandMgrTest, commandProcessedHook) {
     EXPECT_EQ("{ \"result\": 123, \"text\": \"test error message\" }",
               answer->str());
 
-    // Make sure invoked the command-processed callout
+    // Make sure invoked the command_processed callout
     EXPECT_EQ("command_processed_handler", callout_name_);
 
     // Verify the callout could extract all the context arguments
@@ -503,13 +503,13 @@ TEST_F(CommandMgrTest, commandProcessedHook) {
               processed_log_);
 }
 
-// This test verifies that a registered callout for the command-processed
+// This test verifies that a registered callout for the command_processed
 // hookpoint is invoked and can replace the command response content.
 TEST_F(CommandMgrTest, commandProcessedHookReplaceResponse) {
     // Register callout so as we can check that it is called before
     // processing the command by the manager.
     HooksManager::preCalloutsLibraryHandle().registerCallout(
-        "command-processed", command_processed_callout);
+        "command_processed", command_processed_callout);
 
     // Install local handler
     EXPECT_NO_THROW(CommandMgr::instance().registerCommand("my-command",
@@ -532,7 +532,7 @@ TEST_F(CommandMgrTest, commandProcessedHookReplaceResponse) {
     EXPECT_EQ("{ \"result\": 777, \"text\": \"replaced response text\" }",
               answer->str());
 
-    // Make sure invoked the command-processed callout
+    // Make sure invoked the command_processed callout
     EXPECT_EQ("command_processed_handler", callout_name_);
 
     // Verify the callout could extract all the context arguments