2018-07-08 15:22:03 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
2019-02-19 18:52:19 +00:00
|
|
|
* This source code is licensed in accordance with the terms specified in
|
|
|
|
* the LICENSE file found in the root directory of this source tree.
|
2018-07-08 15:22:03 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
2018-09-21 18:54:31 +00:00
|
|
|
#include <osquery/events/linux/selinux_events.h>
|
|
|
|
#include <osquery/tables/events/linux/selinux_events.h>
|
2018-07-08 15:22:03 +00:00
|
|
|
|
|
|
|
namespace osquery {
|
|
|
|
class SELinuxEventsTests : public testing::Test {};
|
|
|
|
|
|
|
|
TEST_F(SELinuxEventsTests, record_type_labels) {
|
|
|
|
EXPECT_EQ(kSELinuxRecordLabels.size(), kSELinuxEventList.size());
|
|
|
|
|
|
|
|
for (auto event_type : kSELinuxEventList) {
|
|
|
|
auto label_it = kSELinuxRecordLabels.find(event_type);
|
|
|
|
EXPECT_TRUE(label_it != kSELinuxRecordLabels.end());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // namespace osquery
|