diff options
| author | root <[email protected]> | 2024-08-13 07:29:41 +0000 |
|---|---|---|
| committer | root <[email protected]> | 2024-08-13 07:29:41 +0000 |
| commit | 7dd54ad0eca50b3d1d6df17867a58a40a19462c6 (patch) | |
| tree | 77a35c9c1c6f73a3f98c3665e7a48690abf08476 /test/maat_framework_gtest.cpp | |
| parent | 71871622dd8e38edf157e27b493ee6b347f69d9e (diff) | |
modify fqdn_plugin table
Diffstat (limited to 'test/maat_framework_gtest.cpp')
| -rw-r--r-- | test/maat_framework_gtest.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/maat_framework_gtest.cpp b/test/maat_framework_gtest.cpp index 090a619..25f039f 100644 --- a/test/maat_framework_gtest.cpp +++ b/test/maat_framework_gtest.cpp @@ -5764,7 +5764,7 @@ void fqdn_plugin_ex_new_cb(const char *table_name, int table_id, const char *key EXPECT_EQ(ret, 0); ud->rule_id = atoi(table_line + column_offset); - ret = get_column_pos(table_line, 4, &column_offset, &column_len); + ret = get_column_pos(table_line, 3, &column_offset, &column_len); EXPECT_EQ(ret, 0); sscanf(table_line + column_offset, "catid=%d", &ud->catid); @@ -8660,17 +8660,17 @@ TEST_F(MaatCmd, UpdateFQDNPlugin) { struct maat *maat_inst = MaatCmd::_shared_maat_inst; int *ex_data_counter = MaatCmd::_ex_data_counter; const char *table_line_add[TEST_CMD_LINE_NUM]={ - "201\t0\twww.example1.com\tcatid=1\t1", - "202\t1\t.example1.com\tcatid=1\t1", - "203\t0\tnews.example1.com\tcatid=2\t1", - "204\t0\tr3---sn-i3belne6.example2.com\tcatid=3\t1", - "205\t0\tr3---sn-i3belne6.example2.com\tcatid=3\t1"}; + "201\twww.example1.com\tcatid=1\t1", + "202\t*.example1.com\tcatid=1\t1", + "203\tnews.example1.com\tcatid=2\t1", + "204\tr3---sn-i3belne6.example2.com\tcatid=3\t1", + "205\tr3---sn-i3belne6.example2.com\tcatid=3\t1"}; const char *table_line_del[TEST_CMD_LINE_NUM]={ - "201\t0\twww.example1.com\tcatid=1\t0", - "202\t1\t.example1.com\tcatid=1\t0", - "203\t0\tnews.example1.com\tcatid=2\t0", - "204\t0\tr3---sn-i3belne6.example2.com\tcatid=3\t0", - "205\t0\tr3---sn-i3belne6.example2.com\tcatid=3\t0"}; + "201\twww.example1.com\tcatid=1\t0", + "202\t*.example1.com\tcatid=1\t0", + "203\tnews.example1.com\tcatid=2\t0", + "204\tr3---sn-i3belne6.example2.com\tcatid=3\t0", + "205\tr3---sn-i3belne6.example2.com\tcatid=3\t0"}; int table_id = maat_get_table_id(maat_inst, table_name); ASSERT_GT(table_id, 0); |
