mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
33 lines
822 B
C++
33 lines
822 B
C++
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed in accordance with the terms specified in
|
|
* the LICENSE file found in the root directory of this source tree.
|
|
*/
|
|
|
|
// Sanity check integration test for user_groups
|
|
// Spec file: specs/user_groups.table
|
|
|
|
#include <osquery/tests/integration/tables/helper.h>
|
|
|
|
namespace osquery {
|
|
namespace table_tests {
|
|
|
|
class UserGroups : public testing::Test {
|
|
protected:
|
|
void SetUp() override {
|
|
setUpEnvironment();
|
|
}
|
|
};
|
|
|
|
TEST_F(UserGroups, test_sanity) {
|
|
QueryData data = execute_query("select * from user_groups");
|
|
ASSERT_GT(data.size(), 0ul);
|
|
ValidationMap row_map = {{"uid", verifyUidGid}, {"gid", verifyUidGid}};
|
|
validate_rows(data, row_map);
|
|
}
|
|
|
|
} // namespace table_tests
|
|
} // namespace osquery
|