Commit 92ffc5bc authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[#755,!502] Removed duplicated test after the rebase.

parent 3e5d5787
......@@ -553,80 +553,6 @@ TEST_F(CtrlChannelDhcpv6SrvTest, controlChannelShutdown) {
EXPECT_EQ("{ \"result\": 0, \"text\": \"Shutting down.\" }",response);
}
// Tests that the server properly responds to statistics commands. Note this
// is really only intended to verify that the appropriate Statistics handler
// is called based on the command. It is not intended to be an exhaustive
// test of Dhcpv6 statistics.
TEST_F(CtrlChannelDhcpv6SrvTest, controlChannelStats) {
createUnixChannelServer();
std::string response;
// Check statistic-get
sendUnixCommand("{ \"command\" : \"statistic-get\", "
" \"arguments\": {"
" \"name\":\"bogus\" }}", response);
EXPECT_EQ("{ \"arguments\": { }, \"result\": 0 }", response);
// Check statistic-get-all
sendUnixCommand("{ \"command\" : \"statistic-get-all\", "
" \"arguments\": {}}", response);
EXPECT_EQ("{ \"arguments\": { }, \"result\": 0 }", response);
// Check statistic-reset
sendUnixCommand("{ \"command\" : \"statistic-reset\", "
" \"arguments\": {"
" \"name\":\"bogus\" }}", response);
EXPECT_EQ("{ \"result\": 1, \"text\": \"No 'bogus' statistic found\" }",
response);
// Check statistic-reset-all
sendUnixCommand("{ \"command\" : \"statistic-reset-all\", "
" \"arguments\": {}}", response);
EXPECT_EQ("{ \"result\": 0, \"text\": "
"\"All statistics reset to neutral values.\" }", response);
// Check statistic-remove
sendUnixCommand("{ \"command\" : \"statistic-remove\", "
" \"arguments\": {"
" \"name\":\"bogus\" }}", response);
EXPECT_EQ("{ \"result\": 1, \"text\": \"No 'bogus' statistic found\" }",
response);
// Check statistic-remove-all
sendUnixCommand("{ \"command\" : \"statistic-remove-all\", "
" \"arguments\": {}}", response);
EXPECT_EQ("{ \"result\": 0, \"text\": \"All statistics removed.\" }",
response);
// Check statistic-sample-age-set
sendUnixCommand("{ \"command\" : \"statistic-sample-age-set\", "
" \"arguments\": {"
" \"name\":\"bogus\", \"duration\": 1245 }}", response);
EXPECT_EQ("{ \"result\": 1, \"text\": \"No 'bogus' statistic found\" }",
response);
// Check statistic-sample-age-set-all
sendUnixCommand("{ \"command\" : \"statistic-sample-age-set-all\", "
" \"arguments\": {"
" \"duration\": 1245 }}", response);
EXPECT_EQ("{ \"result\": 0, \"text\": \"All statistics duration limit are set.\" }",
response);
// Check statistic-sample-count-set
sendUnixCommand("{ \"command\" : \"statistic-sample-count-set\", "
" \"arguments\": {"
" \"name\":\"bogus\", \"max-samples\": 100 }}", response);
EXPECT_EQ("{ \"result\": 1, \"text\": \"No 'bogus' statistic found\" }",
response);
// Check statistic-sample-count-set-all
sendUnixCommand("{ \"command\" : \"statistic-sample-count-set-all\", "
" \"arguments\": {"
" \"max-samples\": 100 }}", response);
EXPECT_EQ("{ \"result\": 0, \"text\": \"All statistics count limit are set.\" }",
response);
}
// Check that the "config-set" command will replace current configuration
TEST_F(CtrlChannelDhcpv6SrvTest, configSet) {
createUnixChannelServer();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment