acelyc111 commented on code in PR #1402:
URL:
https://github.com/apache/incubator-pegasus/pull/1402#discussion_r1152154032
##########
src/runtime/test/ranger_resource_policy_manager_test.cpp:
##########
@@ -256,5 +257,96 @@ TEST(ranger_resource_policy_manager_test,
get_table_name_from_app_name_test)
}
}
+class ranger_resource_policy_manager_function_test : public
ranger_resource_policy_manager,
+ public testing::Test
+{
+public:
+ ranger_resource_policy_manager_function_test() :
ranger_resource_policy_manager(nullptr)
+ {
+ acl_policies fake_policy_1;
+ fake_policy_1.allow_policies = {
+ {access_type::kList | access_type::kMetadata, {"user1", "user2"}}};
+ fake_policy_1.allow_policies_exclude = {{access_type::kMetadata,
{"user2"}}};
+ ranger_resource_policy fake_ranger_resource_policy_1;
+ fake_ranger_resource_policy_1.database_names = {"database1"};
+ fake_ranger_resource_policy_1.policies = fake_policy_1;
Review Comment:
How about use init list like:
```
ranger_resource_policy fake_ranger_resource_policy_1({"",
{"database1"},
{},
{{{access_type::kList | access_type::kMetadata, {"user1", "user2"}}},
{{access_type::kMetadata, {"user2"}}},
{},
{}}});
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]