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