mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-08 02:18:53 +00:00
making sure the db is closed in sqlite_util_tests
This commit is contained in:
parent
2b293a9c90
commit
1ff68cabf3
@ -13,7 +13,9 @@ class TestUtilTests : public testing::Test {};
|
||||
|
||||
TEST_F(TestUtilTests, test_expected_results) {
|
||||
int err;
|
||||
auto results = aggregateQuery(kTestQuery, err, createTestDB());
|
||||
auto db = createTestDB();
|
||||
auto results = aggregateQuery(kTestQuery, err, db);
|
||||
sqlite3_close(db);
|
||||
EXPECT_EQ(err, 0);
|
||||
EXPECT_EQ(results, getTestDBExpectedResults());
|
||||
}
|
||||
@ -31,6 +33,7 @@ TEST_F(TestUtilTests, test_get_test_db_result_stream) {
|
||||
}
|
||||
int err_int;
|
||||
auto expected = aggregateQuery(kTestQuery, err_int, db);
|
||||
sqlite3_close(db);
|
||||
EXPECT_EQ(expected, r.second);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user