From: Thomas Markwalder Date: Tue, 5 Sep 2017 19:55:39 +0000 (-0400) Subject: [5111] Replaced hypen with underscore in command_processed hook name X-Git-Tag: trac5073a_base~1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=831db83567d8d0c855ad83e1ca5d58d547e6aacf;p=thirdparty%2Fkea.git [5111] Replaced hypen with underscore in command_processed hook name --- diff --git a/src/lib/config/base_command_mgr.cc b/src/lib/config/base_command_mgr.cc index 9d5c46e547..47d7fa3c67 100644 --- a/src/lib/config/base_command_mgr.cc +++ b/src/lib/config/base_command_mgr.cc @@ -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)); } diff --git a/src/lib/config/tests/command_mgr_unittests.cc b/src/lib/config/tests/command_mgr_unittests.cc index fdc3341154..4b5d10bb22 100644 --- a/src/lib/config/tests/command_mgr_unittests.cc +++ b/src/lib/config/tests/command_mgr_unittests.cc @@ -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