mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 17:45:22 +00:00
Fix typo in ValidationMap type name (#5837)
This commit is contained in:
parent
e5599c01f3
commit
fe284506ac
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(accountPolicyData, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"uid", IntType}
|
||||
// {"creation_time", NormalType}
|
||||
// {"failed_login_count", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(acpiTables, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"size", IntType}
|
||||
// {"md5", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(adConfig, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"domain", NormalType}
|
||||
// {"option", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(alf, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"allow_signed_enabled", IntType}
|
||||
// {"firewall_unload", IntType}
|
||||
// {"global_state", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(alfExceptions, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"path", NormalType}
|
||||
// {"state", IntType}
|
||||
//}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(alfExplicitAuths, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"process", NormalType}
|
||||
//}
|
||||
// 4. Perform validation
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(alfServices, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"service", NormalType}
|
||||
// {"process", NormalType}
|
||||
// {"state", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(appSchemes, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"scheme", NormalType}
|
||||
// {"handler", NormalType}
|
||||
// {"enabled", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(appcompatShims, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"executable", NormalType}
|
||||
// {"path", NormalType}
|
||||
// {"description", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(apps, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"path", NormalType}
|
||||
// {"bundle_executable", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -30,7 +29,7 @@ TEST_F(AptSourcesTest, test_sanity) {
|
||||
LOG(WARNING) << "select from \"apt_sources\" table returned no results and "
|
||||
"therefore won't be tested";
|
||||
} else {
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"name", NonEmptyString},
|
||||
{"source", FileOnDisk},
|
||||
{"base_uri", NonEmptyString},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -25,7 +24,7 @@ class ArpCacheTest : public testing::Test {
|
||||
TEST_F(ArpCacheTest, test_sanity) {
|
||||
QueryData data = execute_query("select * from arp_cache");
|
||||
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"address", verifyIpAddress},
|
||||
{"mac", verifyMacAddress},
|
||||
{"interface", NonEmptyString},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(asl, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"time", IntType}
|
||||
// {"time_nano_sec", IntType}
|
||||
// {"host", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -24,7 +23,7 @@ class atomPackages : public testing::Test {
|
||||
|
||||
TEST_F(atomPackages, test_sanity) {
|
||||
auto const data = execute_query("select * from atom_packages");
|
||||
ValidatatioMap row_map = {
|
||||
ValidationMap row_map = {
|
||||
{"name", NormalType},
|
||||
{"version", NormalType},
|
||||
{"description", NormalType},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(augeas, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"node", NormalType}
|
||||
// {"value", NormalType}
|
||||
// {"label", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(authenticode, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"path", NormalType}
|
||||
// {"original_program_name", NormalType}
|
||||
// {"serial_number", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(authorizationMechanisms, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"label", NormalType}
|
||||
// {"plugin", NormalType}
|
||||
// {"mechanism", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(authorizations, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"label", NormalType}
|
||||
// {"modified", NormalType}
|
||||
// {"allow_root", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(authorizedKeys, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"uid", IntType}
|
||||
// {"algorithm", NormalType}
|
||||
// {"key", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(autoexec, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"path", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"source", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(battery, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"manufacturer", NormalType}
|
||||
// {"manufacture_date", IntType}
|
||||
// {"model", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(bitlockerInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"device_id", NormalType}
|
||||
// {"drive_letter", NormalType}
|
||||
// {"persistent_volume_id", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(blockDevices, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"parent", NormalType}
|
||||
// {"vendor", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(browserPlugins, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"uid", IntType}
|
||||
// {"name", NormalType}
|
||||
// {"identifier", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(carbonBlackInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"sensor_id", IntType}
|
||||
// {"config_name", NormalType}
|
||||
// {"collect_store_files", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(carves, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"time", IntType}
|
||||
// {"sha256", NormalType}
|
||||
// {"size", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(certificates, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"common_name", NormalType}
|
||||
// {"subject", NormalType}
|
||||
// {"issuer", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(chocolateyPackages, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"version", NormalType}
|
||||
// {"summary", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(chromeExtensions, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"uid", IntType}
|
||||
// {"name", NormalType}
|
||||
// {"identifier", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -25,18 +24,18 @@ class cpuInfo : public testing::Test {
|
||||
TEST_F(cpuInfo, test_sanity) {
|
||||
const QueryData data = execute_query("select * from cpu_info");
|
||||
ASSERT_EQ(data.size(), 1ul);
|
||||
ValidatatioMap row_map = {{"device_id", NormalType},
|
||||
{"model", NormalType},
|
||||
{"manufacturer", NormalType},
|
||||
{"processor_type", NonNegativeOrErrorInt},
|
||||
{"availability", NonNegativeOrErrorInt},
|
||||
{"cpu_status", NonNegativeOrErrorInt},
|
||||
{"number_of_cores", NonNegativeOrErrorInt},
|
||||
{"logical_processors", NonNegativeOrErrorInt},
|
||||
{"address_width", NonNegativeOrErrorInt},
|
||||
{"current_clock_speed", NonNegativeOrErrorInt},
|
||||
{"max_clock_speed", NonNegativeOrErrorInt},
|
||||
{"socket_designation", NormalType}};
|
||||
ValidationMap row_map = {{"device_id", NormalType},
|
||||
{"model", NormalType},
|
||||
{"manufacturer", NormalType},
|
||||
{"processor_type", NonNegativeOrErrorInt},
|
||||
{"availability", NonNegativeOrErrorInt},
|
||||
{"cpu_status", NonNegativeOrErrorInt},
|
||||
{"number_of_cores", NonNegativeOrErrorInt},
|
||||
{"logical_processors", NonNegativeOrErrorInt},
|
||||
{"address_width", NonNegativeOrErrorInt},
|
||||
{"current_clock_speed", NonNegativeOrErrorInt},
|
||||
{"max_clock_speed", NonNegativeOrErrorInt},
|
||||
{"socket_designation", NormalType}};
|
||||
validate_rows(data, row_map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(cpuTime, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"core", IntType}
|
||||
// {"user", IntType}
|
||||
// {"nice", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(cpuid, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"feature", NormalType}
|
||||
// {"value", NormalType}
|
||||
// {"output_register", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(crashes, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"type", NormalType}
|
||||
// {"pid", IntType}
|
||||
// {"path", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -38,22 +37,22 @@ TEST_F(Crontab, test_sanity) {
|
||||
"dec"};
|
||||
std::unordered_set<std::string> days_list = {
|
||||
"mon", "tue", "wed", "thu", "fri", "sat", "sun"};
|
||||
ValidatatioMap row_map = {{"event",
|
||||
SpecificValuesCheck{"",
|
||||
"@reboot",
|
||||
"@hourly",
|
||||
"@daily",
|
||||
"@weekly",
|
||||
"@monthly",
|
||||
"@annually",
|
||||
"@yearly"}},
|
||||
{"minute", CronValuesCheck(0, 59)},
|
||||
{"hour", CronValuesCheck(0, 23)},
|
||||
{"day_of_month", CronValuesCheck(1, 31)},
|
||||
{"month", CronValuesCheck(1, 31, month_list)},
|
||||
{"day_of_week", CronValuesCheck(0, 7, days_list)},
|
||||
{"command", NonEmptyString},
|
||||
{"path", FileOnDisk}};
|
||||
ValidationMap row_map = {{"event",
|
||||
SpecificValuesCheck{"",
|
||||
"@reboot",
|
||||
"@hourly",
|
||||
"@daily",
|
||||
"@weekly",
|
||||
"@monthly",
|
||||
"@annually",
|
||||
"@yearly"}},
|
||||
{"minute", CronValuesCheck(0, 59)},
|
||||
{"hour", CronValuesCheck(0, 23)},
|
||||
{"day_of_month", CronValuesCheck(1, 31)},
|
||||
{"month", CronValuesCheck(1, 31, month_list)},
|
||||
{"day_of_week", CronValuesCheck(0, 7, days_list)},
|
||||
{"command", NonEmptyString},
|
||||
{"path", FileOnDisk}};
|
||||
validate_rows(data, row_map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(cupsDestinations, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"option_name", NormalType}
|
||||
// {"option_value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(cupsJobs, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"title", NormalType}
|
||||
// {"destination", NormalType}
|
||||
// {"user", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(curl, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"url", NormalType}
|
||||
// {"method", NormalType}
|
||||
// {"user_agent", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(curlCertificate, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"hostname", NormalType}
|
||||
// {"common_name", NormalType}
|
||||
// {"organization", NormalType}
|
||||
|
@ -26,7 +26,7 @@ class DebPackages : public testing::Test {
|
||||
TEST_F(DebPackages, test_sanity) {
|
||||
QueryData rows = execute_query("select * from deb_packages");
|
||||
if (rows.size() > 0) {
|
||||
ValidatatioMap row_map = {
|
||||
ValidationMap row_map = {
|
||||
{"name", NonEmptyString},
|
||||
{"version", NonEmptyString},
|
||||
{"source", NormalType},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(deviceFile, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"device", NormalType}
|
||||
// {"partition", NormalType}
|
||||
// {"path", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(deviceFirmware, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"type", NormalType}
|
||||
// {"device", NormalType}
|
||||
// {"version", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -34,7 +33,7 @@ TEST_F(deviceHash, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"device", NormalType}
|
||||
// {"partition", NormalType}
|
||||
// {"inode", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(devicePartitions, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"device", NormalType}
|
||||
// {"partition", IntType}
|
||||
// {"label", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(diskEncryption, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"uuid", NormalType}
|
||||
// {"encrypted", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(diskEvents, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"action", NormalType}
|
||||
// {"path", NormalType}
|
||||
// {"name", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(diskInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"partitions", IntType}
|
||||
// {"disk_index", IntType}
|
||||
// {"type", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dnsResolvers, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", IntType}
|
||||
// {"type", NormalType}
|
||||
// {"address", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerContainerLabels, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"key", NormalType}
|
||||
// {"value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerContainerMounts, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"type", NormalType}
|
||||
// {"name", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerContainerNetworks, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"network_id", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerContainerPorts, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"type", NormalType}
|
||||
// {"port", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(dockerContainerProcesses, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"pid", IntType}
|
||||
// {"name", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(dockerContainerStats, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"pids", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerContainers, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"image", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerImageLabels, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"key", NormalType}
|
||||
// {"value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerImages, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"created", IntType}
|
||||
// {"size_bytes", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"containers", IntType}
|
||||
// {"containers_running", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerNetworkLabels, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"key", NormalType}
|
||||
// {"value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerNetworks, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"id", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"driver", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerVersion, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"version", NormalType}
|
||||
// {"api_version", NormalType}
|
||||
// {"min_api_version", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerVolumeLabels, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"key", NormalType}
|
||||
// {"value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(dockerVolumes, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"driver", NormalType}
|
||||
// {"mount_point", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(drivers, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"device_id", NormalType}
|
||||
// {"device_name", NormalType}
|
||||
// {"image", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(ec2InstanceMetadata, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"instance_id", NormalType}
|
||||
// {"instance_type", NormalType}
|
||||
// {"architecture", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(ec2InstanceTags, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"instance_id", NormalType}
|
||||
// {"key", NormalType}
|
||||
// {"value", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(elfDynamic, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"tag", IntType}
|
||||
// {"value", IntType}
|
||||
// {"class", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(elfInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"class", NormalType}
|
||||
// {"abi", NormalType}
|
||||
// {"abi_version", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(elfSections, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"type", IntType}
|
||||
// {"vaddr", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(elfSegments, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"offset", IntType}
|
||||
// {"vaddr", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(elfSymbols, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"addr", IntType}
|
||||
// {"size", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(etcHosts, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"address", NormalType}
|
||||
// {"hostnames", NormalType}
|
||||
//}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -24,7 +23,7 @@ class EtcProtocolsTest : public testing::Test {
|
||||
|
||||
TEST_F(EtcProtocolsTest, test_sanity) {
|
||||
auto const rows = execute_query("select * from etc_protocols");
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"name", NonEmptyString},
|
||||
{"number", NonNegativeInt},
|
||||
{"alias", NonEmptyString},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(etcServices, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"port", IntType}
|
||||
// {"protocol", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(eventTaps, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"enabled", IntType}
|
||||
// {"event_tap_id", IntType}
|
||||
// {"event_tapped", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(example, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"points", IntType}
|
||||
// {"size", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -33,7 +32,7 @@ TEST_F(extendedAttributes, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"path", NormalType}
|
||||
// {"directory", NormalType}
|
||||
// {"key", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(fanSpeedSensors, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"fan", NormalType}
|
||||
// {"name", NormalType}
|
||||
// {"actual", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(fbsdKmods, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"size", IntType}
|
||||
// {"refs", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -49,23 +48,23 @@ TEST_F(FileTests, test_sanity) {
|
||||
"\"");
|
||||
EXPECT_EQ(data.size(), 1ul);
|
||||
|
||||
ValidatatioMap row_map = {{"path", FileOnDisk},
|
||||
{"directory", DirectoryOnDisk},
|
||||
{"filename", NonEmptyString},
|
||||
{"inode", IntType},
|
||||
{"uid", NonNegativeInt},
|
||||
{"gid", NonNegativeInt},
|
||||
{"mode", NormalType},
|
||||
{"device", IntType},
|
||||
{"size", NonNegativeInt},
|
||||
{"block_size", NonNegativeInt},
|
||||
{"atime", NonNegativeInt},
|
||||
{"mtime", NonNegativeInt},
|
||||
{"ctime", NonNegativeInt},
|
||||
{"btime", NonNegativeInt},
|
||||
{"hard_links", IntType},
|
||||
{"symlink", IntType},
|
||||
{"type", NonEmptyString}};
|
||||
ValidationMap row_map = {{"path", FileOnDisk},
|
||||
{"directory", DirectoryOnDisk},
|
||||
{"filename", NonEmptyString},
|
||||
{"inode", IntType},
|
||||
{"uid", NonNegativeInt},
|
||||
{"gid", NonNegativeInt},
|
||||
{"mode", NormalType},
|
||||
{"device", IntType},
|
||||
{"size", NonNegativeInt},
|
||||
{"block_size", NonNegativeInt},
|
||||
{"atime", NonNegativeInt},
|
||||
{"mtime", NonNegativeInt},
|
||||
{"ctime", NonNegativeInt},
|
||||
{"btime", NonNegativeInt},
|
||||
{"hard_links", IntType},
|
||||
{"symlink", IntType},
|
||||
{"type", NonEmptyString}};
|
||||
#ifdef WIN32
|
||||
row_map["attributes"] = NormalType;
|
||||
row_map["volume_serial"] = NormalType;
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(fileEvents, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"target_path", NormalType}
|
||||
// {"category", NormalType}
|
||||
// {"action", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(firefoxAddons, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"uid", IntType}
|
||||
// {"name", NormalType}
|
||||
// {"identifier", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(gatekeeper, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"assessments_enabled", IntType}
|
||||
// {"dev_id_enabled", IntType}
|
||||
// {"version", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(gatekeeperApprovedApps, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"path", NormalType}
|
||||
// {"requirement", NormalType}
|
||||
// {"ctime", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(groups, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"gid", IntType}
|
||||
// {"gid_signed", IntType}
|
||||
// {"groupname", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(hardwareEvents, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"action", NormalType}
|
||||
// {"path", NormalType}
|
||||
// {"type", NormalType}
|
||||
|
@ -44,7 +44,7 @@ TEST_F(Hash, test_sanity) {
|
||||
|
||||
ASSERT_EQ(data.size(), 1ul);
|
||||
|
||||
ValidatatioMap row_map = {
|
||||
ValidationMap row_map = {
|
||||
{"path", NonEmptyString},
|
||||
{"directory", NonEmptyString},
|
||||
{"md5", NonEmptyString},
|
||||
|
@ -142,7 +142,7 @@ QueryData execute_query(std::string query) {
|
||||
return rows;
|
||||
}
|
||||
|
||||
void validate_row(const Row& row, const ValidatatioMap& validation_map) {
|
||||
void validate_row(const Row& row, const ValidationMap& validation_map) {
|
||||
for (auto const& rec : row) {
|
||||
EXPECT_NE(validation_map.count(rec.first), std::size_t{0})
|
||||
<< "Unexpected column " << boost::io::quoted(rec.first) << " in a row";
|
||||
@ -154,7 +154,7 @@ void validate_row(const Row& row, const ValidatatioMap& validation_map) {
|
||||
<< "Could not find column " << boost::io::quoted(key)
|
||||
<< " in the generated columns";
|
||||
std::string value = row_data_iter->second;
|
||||
ValidatatioDataType validator = iter.second;
|
||||
ValidationDataType validator = iter.second;
|
||||
if (validator.type() == typeid(int)) {
|
||||
int flags = boost::get<int>(validator);
|
||||
ASSERT_TRUE(validate_value_using_flags(value, flags))
|
||||
@ -168,7 +168,7 @@ void validate_row(const Row& row, const ValidatatioMap& validation_map) {
|
||||
}
|
||||
}
|
||||
void validate_rows(const std::vector<Row>& rows,
|
||||
const ValidatatioMap& validation_map) {
|
||||
const ValidationMap& validation_map) {
|
||||
for (auto row : rows) {
|
||||
validate_row(row, validation_map);
|
||||
}
|
||||
|
@ -77,15 +77,14 @@ enum {
|
||||
};
|
||||
|
||||
using CustomCheckerType = std::function<bool(const std::string&)>;
|
||||
using ValidatatioDataType = boost::variant<int, CustomCheckerType>;
|
||||
using ValidatatioMap = std::unordered_map<std::string, ValidatatioDataType>;
|
||||
using ValidationDataType = boost::variant<int, CustomCheckerType>;
|
||||
using ValidationMap = std::unordered_map<std::string, ValidationDataType>;
|
||||
|
||||
QueryData execute_query(std::string query);
|
||||
|
||||
void validate_row(const Row& row,
|
||||
const ValidatatioMap& validation_map);
|
||||
void validate_row(const Row& row, const ValidationMap& validation_map);
|
||||
void validate_rows(const std::vector<Row>& rows,
|
||||
const ValidatatioMap& validation_map);
|
||||
const ValidationMap& validation_map);
|
||||
bool validate_value_using_flags(const std::string& value, int flags);
|
||||
bool is_valid_hex(const std::string& value);
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(homebrewPackages, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"path", NormalType}
|
||||
// {"version", NormalType}
|
||||
|
@ -25,7 +25,7 @@ TEST_F(IBridgeTest, test_sanity) {
|
||||
VLOG(1) << "Empty result for table: ibridge, skipping test";
|
||||
} else {
|
||||
ASSERT_EQ(rows.size(), 1ul);
|
||||
ValidatatioMap validation_map = {
|
||||
ValidationMap validation_map = {
|
||||
{"boot_uuid", NormalType},
|
||||
{"coprocessor_version", NonEmptyString},
|
||||
{"firmware_version", NonEmptyString},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(ieExtensions, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"registry_path", NormalType}
|
||||
// {"version", NormalType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(intelMeInfo, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"version", NormalType}
|
||||
//}
|
||||
// 4. Perform validation
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -27,7 +26,7 @@ class InterfaceAddressesTest : public testing::Test {
|
||||
TEST_F(InterfaceAddressesTest, test_sanity) {
|
||||
QueryData const rows = execute_query("select * from interface_addresses");
|
||||
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"interface", NonEmptyString},
|
||||
{"address", verifyIpAddress},
|
||||
{"mask", verifyIpAddress},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -71,7 +70,7 @@ TEST_F(InterfaceDetailsTest, test_sanity) {
|
||||
return true;
|
||||
};
|
||||
#endif
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"interface", NonEmptyString},
|
||||
{"mac", verify_non_empty_string_or_empty_on_win},
|
||||
{"type", NonNegativeInt},
|
||||
|
@ -23,7 +23,7 @@ class InterfaceIpv6Test : public testing::Test {
|
||||
|
||||
TEST_F(InterfaceIpv6Test, test_sanity) {
|
||||
QueryData const rows = execute_query("select * from interface_ipv6");
|
||||
auto const row_map = ValidatatioMap{
|
||||
auto const row_map = ValidationMap{
|
||||
{"interface", NonEmptyString},
|
||||
{"hop_limit", IntMinMaxCheck(0, 255)},
|
||||
{"forwarding_enabled", Bool},
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(iokitDevicetree, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"class", NormalType}
|
||||
// {"id", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(iokitRegistry, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"name", NormalType}
|
||||
// {"class", NormalType}
|
||||
// {"id", IntType}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -27,24 +26,24 @@ TEST_F(iptables, test_sanity) {
|
||||
|
||||
ASSERT_GE(data.size(), 0ul);
|
||||
|
||||
ValidatatioMap row_map = {{"filter_name", NonEmptyString},
|
||||
{"chain", NormalType},
|
||||
{"policy", NormalType},
|
||||
{"target", NormalType},
|
||||
{"protocol", IntType},
|
||||
{"src_port", IntMinMaxCheck(0, 65535)},
|
||||
{"dst_port", IntMinMaxCheck(0, 65535)},
|
||||
{"src_ip", verifyEmptyStringOrIpAddress},
|
||||
{"src_mask", verifyEmptyStringOrIpAddress},
|
||||
{"iniface", NormalType},
|
||||
{"iniface_mask", verifyEmptyStringOrIpAddress},
|
||||
{"dst_ip", verifyEmptyStringOrIpAddress},
|
||||
{"dst_mask", verifyEmptyStringOrIpAddress},
|
||||
{"outiface", NormalType},
|
||||
{"outiface_mask", verifyEmptyStringOrIpAddress},
|
||||
{"match", SpecificValuesCheck{"yes", "no"}},
|
||||
{"packets", NonNegativeInt},
|
||||
{"bytes", NonNegativeInt}};
|
||||
ValidationMap row_map = {{"filter_name", NonEmptyString},
|
||||
{"chain", NormalType},
|
||||
{"policy", NormalType},
|
||||
{"target", NormalType},
|
||||
{"protocol", IntType},
|
||||
{"src_port", IntMinMaxCheck(0, 65535)},
|
||||
{"dst_port", IntMinMaxCheck(0, 65535)},
|
||||
{"src_ip", verifyEmptyStringOrIpAddress},
|
||||
{"src_mask", verifyEmptyStringOrIpAddress},
|
||||
{"iniface", NormalType},
|
||||
{"iniface_mask", verifyEmptyStringOrIpAddress},
|
||||
{"dst_ip", verifyEmptyStringOrIpAddress},
|
||||
{"dst_mask", verifyEmptyStringOrIpAddress},
|
||||
{"outiface", NormalType},
|
||||
{"outiface_mask", verifyEmptyStringOrIpAddress},
|
||||
{"match", SpecificValuesCheck{"yes", "no"}},
|
||||
{"packets", NonNegativeInt},
|
||||
{"bytes", NonNegativeInt}};
|
||||
validate_rows(data, row_map);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
@ -32,7 +31,7 @@ TEST_F(kernelExtensions, test_sanity) {
|
||||
// 3. Build validation map
|
||||
// See helper.h for avaialbe flags
|
||||
// Or use custom DataCheck object
|
||||
// ValidatatioMap row_map = {
|
||||
// ValidationMap row_map = {
|
||||
// {"idx", IntType}
|
||||
// {"refs", IntType}
|
||||
// {"size", IntType}
|
||||
|
@ -23,10 +23,10 @@ class KernelInfo : public testing::Test {
|
||||
|
||||
TEST_F(KernelInfo, test_sanity) {
|
||||
QueryData data = execute_query("select * from kernel_info");
|
||||
ValidatatioMap row_map = {{"version", NonEmptyString},
|
||||
{"arguments", NormalType},
|
||||
{"path", NormalType},
|
||||
{"device", NonEmptyString}};
|
||||
ValidationMap row_map = {{"version", NonEmptyString},
|
||||
{"arguments", NormalType},
|
||||
{"path", NormalType},
|
||||
{"device", NonEmptyString}};
|
||||
validate_rows(data, row_map);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user