osquery-1/tests/integration/tables/user_groups.cpp
2019-09-25 23:35:15 -04:00

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