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