summaryrefslogtreecommitdiffstats
path: root/src/lib/process/tests/d_controller_unittests.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/process/tests/d_controller_unittests.cc')
-rw-r--r--src/lib/process/tests/d_controller_unittests.cc64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/lib/process/tests/d_controller_unittests.cc b/src/lib/process/tests/d_controller_unittests.cc
index bfc7885200..1858e31628 100644
--- a/src/lib/process/tests/d_controller_unittests.cc
+++ b/src/lib/process/tests/d_controller_unittests.cc
@@ -290,70 +290,6 @@ TEST_F(DStubControllerTest, configUpdateTests) {
EXPECT_EQ(1, rcode);
}
-/// @brief Command execution tests.
-/// This really tests just the ability of the handler to invoke the necessary
-/// chain of methods and to handle error conditions.
-/// This test verifies that:
-/// 1. That an unrecognized command is detected and returns a status of
-/// process::COMMAND_INVALID.
-/// 2. Shutdown command is recognized and returns a process::COMMAND_SUCCESS
-/// status.
-/// 3. A valid, custom controller command is recognized a
-/// process::COMMAND_SUCCESS
-/// status.
-/// 4. A valid, custom process command is recognized a
-/// process::COMMAND_SUCCESS status.
-/// 5. That a valid controller command that fails returns a
-/// process::COMMAND_ERROR.
-/// 6. That a valid process command that fails returns a process::COMMAND_ERROR.
-TEST_F(DStubControllerTest, executeCommandTests) {
- int rcode = -1;
- isc::data::ConstElementPtr answer;
- isc::data::ElementPtr arg_set;
-
- // Initialize the application process.
- ASSERT_NO_THROW(initProcess());
- EXPECT_TRUE(checkProcess());
-
- // Verify that an unknown command returns an process::COMMAND_INVALID
- // response.
- std::string bogus_command("bogus");
- answer = executeCommand(bogus_command, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_INVALID, rcode);
-
- // Verify that shutdown command returns process::COMMAND_SUCCESS response.
- answer = executeCommand(SHUT_DOWN_COMMAND, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_SUCCESS, rcode);
-
- // Verify that a valid custom controller command returns
- // process::COMMAND_SUCCESS response.
- answer = executeCommand(DStubController::stub_ctl_command_, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_SUCCESS, rcode);
-
- // Verify that a valid custom process command returns
- // process::COMMAND_SUCCESS response.
- answer = executeCommand(DStubProcess::stub_proc_command_, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_SUCCESS, rcode);
-
- // Verify that a valid custom controller command that fails returns
- // a process::COMMAND_ERROR.
- SimFailure::set(SimFailure::ftControllerCommand);
- answer = executeCommand(DStubController::stub_ctl_command_, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_ERROR, rcode);
-
- // Verify that a valid custom process command that fails returns
- // a process::COMMAND_ERROR.
- SimFailure::set(SimFailure::ftProcessCommand);
- answer = executeCommand(DStubProcess::stub_proc_command_, arg_set);
- isc::config::parseAnswer(rcode, answer);
- EXPECT_EQ(COMMAND_ERROR, rcode);
-}
-
// Tests that registered signals are caught and handled.
TEST_F(DStubControllerTest, ioSignals) {
// Tell test controller just to record the signals, don't call the