[PATCH] Ipport plugin unit_test & statistics
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
#define WAIT_FOR_EFFECTIVE_S 2
|
||||
#define MAX_G2G_SCAN_TIMES (1000 * 1000)
|
||||
|
||||
const char *table_info_path = "./table_info.conf";
|
||||
const char *table_info_path = "./group_exclude_table_info.conf";
|
||||
const char *log_file = "./group_exclude_gtest.log";
|
||||
|
||||
struct group_item {
|
||||
long long group_id;
|
||||
@@ -116,11 +117,10 @@ protected:
|
||||
unsigned char *json_buff = NULL;
|
||||
size_t json_buff_size = 0;
|
||||
|
||||
logger = log_handle_create("./group_exclude_gtest.log", 0);
|
||||
logger = log_handle_create(log_file, 0);
|
||||
garbage_bin = maat_garbage_bin_new(60);
|
||||
|
||||
int ret = load_file_to_memory("./group_exclude_table_info.conf",
|
||||
&json_buff, &json_buff_size);
|
||||
int ret = load_file_to_memory(table_info_path, &json_buff, &json_buff_size);
|
||||
if (ret < 0) {
|
||||
log_error(logger, MODULE_GROUP_EXCLUDE_GTEST, "load_file_to_memory failed.");
|
||||
assert(0);
|
||||
@@ -471,8 +471,9 @@ TEST_F(MaatGroupExclude, level_exceed_function) {
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
int ret=0;
|
||||
int ret = 0;
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
ret=RUN_ALL_TESTS();
|
||||
ret = RUN_ALL_TESTS();
|
||||
|
||||
return ret;
|
||||
}
|
||||
Reference in New Issue
Block a user