summaryrefslogtreecommitdiff
path: root/test/test_utils.cpp
diff options
context:
space:
mode:
authorroot <[email protected]>2024-08-13 03:35:50 +0000
committerroot <[email protected]>2024-08-13 03:35:50 +0000
commita6c3e265779300fdf9866a21d886d3e8a61eee81 (patch)
tree1b59353622affba1e4f474bd36ddce7c91a28416 /test/test_utils.cpp
parenta786103b940ba44128fc7e726c15d718f5faf02c (diff)
modify interval table and fix some test case
Diffstat (limited to 'test/test_utils.cpp')
-rw-r--r--test/test_utils.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/test_utils.cpp b/test/test_utils.cpp
index 74fc90c..21729f7 100644
--- a/test/test_utils.cpp
+++ b/test/test_utils.cpp
@@ -242,8 +242,7 @@ int expr_table_set_line(struct maat *maat_inst, const char *table_name,
int interval_table_set_line(struct maat *maat_inst, const char *table_name,
enum maat_operation op, long long item_id, long long group_id,
- unsigned int low_boundary, unsigned int up_boundary,
- const char *district, int expire_after)
+ const char *port_str, const char *district, int expire_after)
{
char table_line[1024] = {0};
int table_id = maat_get_table_id(maat_inst, table_name);
@@ -257,11 +256,11 @@ int interval_table_set_line(struct maat *maat_inst, const char *table_name,
table_type == TABLE_TYPE_INTERVAL_PLUS);
if (table_type == TABLE_TYPE_INTERVAL_PLUS) {
- sprintf(table_line, "%lld\t%lld\t%s\t%u\t%u\t%d",
- item_id, group_id, district, low_boundary, up_boundary, op);
+ sprintf(table_line, "%lld\t%lld\t%s\t%s\t%d",
+ item_id, group_id, district, port_str, op);
} else {
- sprintf(table_line, "%lld\t%lld\t%u\t%u\t%d",
- item_id, group_id, low_boundary, up_boundary, op);
+ sprintf(table_line, "%lld\t%lld\t%s\t%d",
+ item_id, group_id, port_str, op);
}
struct maat_cmd_line line_rule;