mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 09:58:54 +00:00
Added tests for chrome_extensions table. (#6126)
This commit is contained in:
parent
532435d15e
commit
3f632aaea2
@ -22,30 +22,21 @@ class chromeExtensions : public testing::Test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(chromeExtensions, test_sanity) {
|
TEST_F(chromeExtensions, test_sanity) {
|
||||||
// 1. Query data
|
|
||||||
auto const data = execute_query("select * from chrome_extensions");
|
auto const data = execute_query("select * from chrome_extensions");
|
||||||
// 2. Check size before validation
|
ASSERT_GE(data.size(), 0ul);
|
||||||
// ASSERT_GE(data.size(), 0ul);
|
ValidationMap row_map = {{"uid", IntType},
|
||||||
// ASSERT_EQ(data.size(), 1ul);
|
{"name", NonEmptyString},
|
||||||
// ASSERT_EQ(data.size(), 0ul);
|
{"identifier", NonEmptyString},
|
||||||
// 3. Build validation map
|
{"version", NonEmptyString},
|
||||||
// See helper.h for avaialbe flags
|
{"description", NormalType},
|
||||||
// Or use custom DataCheck object
|
{"locale", NormalType},
|
||||||
// ValidationMap row_map = {
|
{"update_url", NonEmptyString},
|
||||||
// {"uid", IntType},
|
{"author", NormalType},
|
||||||
// {"name", NonEmptyString},
|
{"persistent", IntType},
|
||||||
// {"identifier", NonEmptyString},
|
{"path", NonEmptyString},
|
||||||
// {"version", NonEmptyString},
|
{"permissions", NormalType},
|
||||||
// {"description", NormalType},
|
{"profile", NonEmptyString}};
|
||||||
// {"locale", NormalType},
|
validate_rows(data, row_map);
|
||||||
// {"update_url", NonEmptyString},
|
|
||||||
// {"author", NormalType},
|
|
||||||
// {"persistent", IntType},
|
|
||||||
// {"path", NonEmptyString},
|
|
||||||
// {"permissions", NormalType},
|
|
||||||
// {"profile", NonEmptyString}};
|
|
||||||
// 4. Perform validation
|
|
||||||
// validate_rows(data, row_map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace table_tests
|
} // namespace table_tests
|
||||||
|
Loading…
Reference in New Issue
Block a user