hierarchy refactor unfinished
This commit is contained in:
@@ -365,12 +365,6 @@ int main(int argc, char ** argv)
|
||||
{
|
||||
int ret=0;
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
/*
|
||||
struct maat_options *opts = maat_options_new();
|
||||
maat_options_set_json_file(opts, json_path);
|
||||
|
||||
g_maat_instance = maat_new(opts, table_info_path);
|
||||
EXPECT_NE(g_maat_instance, nullptr);*/
|
||||
|
||||
char json_iris_path[128] = {0};
|
||||
char redis_ip[64] = "127.0.0.1";
|
||||
@@ -426,8 +420,7 @@ int main(int argc, char ** argv)
|
||||
redisFree(c);
|
||||
|
||||
struct maat_options *opts = maat_options_new();
|
||||
maat_options_set_redis_ip(opts, redis_ip);
|
||||
maat_options_set_redis_port(opts, redis_port);
|
||||
maat_options_set_redis(opts, redis_ip, redis_port, redis_db);
|
||||
maat_options_set_logger(opts, logger);
|
||||
|
||||
g_maat_instance = maat_new(opts, table_info_path);
|
||||
|
||||
@@ -67,8 +67,7 @@ TEST(iris_mode, maat_scan_string) {
|
||||
snprintf(tmp_iris_inc_idx_path, sizeof(tmp_iris_inc_idx_path), "%s/index", json_iris_path);
|
||||
|
||||
struct maat_options *opts = maat_options_new();
|
||||
maat_options_set_iris_full_index_dir(opts, tmp_iris_full_idx_path);
|
||||
maat_options_set_iris_inc_index_dir(opts, tmp_iris_inc_idx_path);
|
||||
maat_options_set_iris(opts, tmp_iris_full_idx_path, tmp_iris_inc_idx_path);
|
||||
|
||||
struct maat *maat_instance = maat_new(opts, table_info_path);
|
||||
EXPECT_NE(maat_instance, nullptr);
|
||||
@@ -187,8 +186,7 @@ TEST(redis_mode, maat_scan_string) {
|
||||
redisFree(c);
|
||||
|
||||
struct maat_options *opts = maat_options_new();
|
||||
maat_options_set_redis_ip(opts, redis_ip);
|
||||
maat_options_set_redis_port(opts, redis_port);
|
||||
maat_options_set_redis(opts, redis_ip, redis_port, redis_db);
|
||||
maat_options_set_logger(opts, logger);
|
||||
|
||||
struct maat *maat_instance = maat_new(opts, table_info_path);
|
||||
|
||||
@@ -90,5 +90,77 @@
|
||||
"dest": "COMPOSITION_IP_DEST",
|
||||
"session": "COMPOSITION_IP_SESSION"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table_id":9,
|
||||
"table_name":"COMPILE_1",
|
||||
"table_type":"compile",
|
||||
"custom": {
|
||||
"compile_id":1,
|
||||
"service_id":2,
|
||||
"action":3,
|
||||
"do_blacklist":4,
|
||||
"do_log":5,
|
||||
"tags":6,
|
||||
"user_region":7,
|
||||
"is_valid":8,
|
||||
"clause_num":9,
|
||||
"evaluation_order":10
|
||||
}
|
||||
},
|
||||
{
|
||||
"table_id":10,
|
||||
"table_name":"GROUP2COMPILE_1",
|
||||
"table_type":"group2compile",
|
||||
"associated_compile_table_id":9,
|
||||
"custom": {
|
||||
"group_id":1,
|
||||
"compile_id":2,
|
||||
"is_valid":3,
|
||||
"not_flag":4,
|
||||
"virtual_table_name":5,
|
||||
"clause_index":6
|
||||
}
|
||||
},
|
||||
{
|
||||
"table_id":11,
|
||||
"table_name":"COMPILE_2",
|
||||
"table_type":"compile",
|
||||
"custom": {
|
||||
"compile_id":1,
|
||||
"service_id":2,
|
||||
"action":3,
|
||||
"do_blacklist":4,
|
||||
"do_log":5,
|
||||
"tags":6,
|
||||
"user_region":7,
|
||||
"is_valid":8,
|
||||
"clause_num":9,
|
||||
"evaluation_order":10
|
||||
}
|
||||
},
|
||||
{
|
||||
"table_id":12,
|
||||
"table_name":"GROUP2COMPILE_2",
|
||||
"table_type":"group2compile",
|
||||
"associated_compile_table_id":11,
|
||||
"custom": {
|
||||
"group_id":1,
|
||||
"compile_id":2,
|
||||
"is_valid":3,
|
||||
"not_flag":4,
|
||||
"virtual_table_name":5,
|
||||
"clause_index":6
|
||||
}
|
||||
},
|
||||
{
|
||||
"table_id":13,
|
||||
"table_name":"GROUP2GROUP",
|
||||
"table_type":"group2group",
|
||||
"custom": {
|
||||
"group_id":1,
|
||||
"superior_group_id":2,
|
||||
"is_valid":3
|
||||
}
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user