Skip to content

Commit 2cf8a29

Browse files
authored
Fix unittests to catch wrong indexing in setBatch
The values the keys were set to were all the same, so an indexing error would not be caught.
1 parent f9c0d25 commit 2cf8a29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

osquery/database/tests/database_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TEST_F(DatabaseTests, test_set_value_int) {
3737

3838
TEST_F(DatabaseTests, test_set_str_batch) {
3939
DatabaseStringValueList batch = {
40-
{"str1", "{}"}, {"str2", "{}"}, {"str3", "{}"}};
40+
{"str1", "{a}"}, {"str2", "{b}"}, {"str3", "{c}"}};
4141

4242
auto s = setDatabaseBatch(kLogs, batch);
4343
EXPECT_TRUE(s.ok());
@@ -111,7 +111,7 @@ TEST_F(DatabaseTests, test_get_value_mix1) {
111111

112112
TEST_F(DatabaseTests, test_get_str_batch) {
113113
DatabaseStringValueList batch = {
114-
{"str1", "{}"}, {"str2", "{}"}, {"str3", "{}"}};
114+
{"str1", "{a}"}, {"str2", "{b}"}, {"str3", "{c}"}};
115115
auto s = setDatabaseBatch(kLogs, batch);
116116
EXPECT_TRUE(s.ok());
117117

0 commit comments

Comments
 (0)