yifan-c commented on a change in pull request #1258:
URL: https://github.com/apache/cassandra/pull/1258#discussion_r733016519
##########
File path:
test/unit/org/apache/cassandra/cql3/validation/miscellaneous/RoleSyntaxTest.java
##########
@@ -117,6 +117,10 @@ public void grantRevokePermissionsSyntaxTest() throws
Throwable
assertValidSyntax("REVOKE ALTER ON ROLE \"r1\" FROM 'r2'");
assertValidSyntax("REVOKE ALTER ON ROLE $$r1$$ FROM $$ r '2' $$");
+ // grant/revoke multiple permissions in a single statement
Review comment:
nit: consider simplifying the test like the following. It also covers
more for multiple grant on RoleResource.
```java
for (String r1 : Arrays.asList("r1", "'r1'", "\"r1\""...))
{
for (String r2 : Arrays.asList("r2", "'r2'", "\"r2\""...))
{
// grant/revoke on RoleResource
assertValidSyntax(String.format("GRANT ALTER ON ROLE %s TO
%s", r1, r2));
// grant/revoke multiple permissions in a single statement
assertValidSyntax(String.format("GRANT CREATE, ALTER ON ROLE
%s TO %s", r1, r2));
assertValidSyntax(String.format("GRANT CREATE PERMISSION,
ALTER PERMISSION ON ROLE %s TO %s", r1, r2));
}
}
```
--
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]