Added tests for chrome_extensions table. (#6126)

This commit is contained in:
Rachel Cipkins 2019-12-13 19:03:20 -05:00 committed by Teddy Reed
parent 532435d15e
commit 3f632aaea2

View File

@ -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