Assert cmd reply (#2030)

* Assert cmd reply

Signed-off-by: Aredcap <zhangleilei19@mails.ucas.ac.cn>

* fix unittest error

Signed-off-by: Aredcap <zhangleilei19@mails.ucas.ac.cn>
This commit is contained in:
Aredcap 2020-04-23 11:22:58 +08:00 committed by GitHub
parent 889681f63a
commit b55f249938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -935,19 +935,25 @@ TEST_F(RpcHandlerTest, CMD_TEST) {
command.set_cmd("tasktable");
handler->Cmd(&context, &command, &reply);
ASSERT_EQ(reply.status().error_code(), ::grpc::Status::OK.error_code());
command.set_cmd("test");
handler->Cmd(&context, &command, &reply);
ASSERT_EQ(reply.status().error_code(), ::grpc::Status::OK.error_code());
command.set_cmd("status");
handler->Cmd(&context, &command, &reply);
ASSERT_EQ(reply.status().error_code(), ::grpc::Status::OK.error_code());
command.set_cmd("mode");
handler->Cmd(&context, &command, &reply);
ASSERT_EQ(reply.status().error_code(), ::grpc::Status::OK.error_code());
command.set_cmd("build_commit_id");
handler->Cmd(&context, &command, &reply);
ASSERT_EQ(reply.status().error_code(), ::grpc::Status::OK.error_code());
command.set_cmd("set_config");
handler->Cmd(&context, &command, &reply);
command.set_cmd("get_config");
handler->Cmd(&context, &command, &reply);
}