File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
x-pack/plugin/security/qa/security-trial/src/javaRestTest/java/org/elasticsearch/xpack/security/role Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1919import java .util .Map ;
2020import java .util .stream .Collectors ;
2121
22+ import static org .elasticsearch .xpack .core .security .authz .privilege .IndexPrivilege .names ;
2223import static org .hamcrest .Matchers .contains ;
2324import static org .hamcrest .Matchers .containsString ;
2425import static org .hamcrest .Matchers .hasKey ;
2526import static org .hamcrest .Matchers .hasSize ;
2627import static org .hamcrest .Matchers .not ;
27- import static org .elasticsearch .xpack .core .security .authz .privilege .IndexPrivilege .names ;
2828
2929public class PutRoleRestIT extends SecurityOnTrialLicenseRestTestCase {
3030 public void testPutManyValidRoles () throws Exception {
@@ -330,15 +330,10 @@ public void testPutRoleWithInvalidManageRolesPrivilege() throws Exception {
330330 + unknownPrivilege
331331 + "]. a privilege must be either "
332332 + "one of the predefined fixed indices privileges ["
333- + Strings .collectionToCommaDelimitedString (
334- IndexPrivilege .names ().stream ()
335- .sorted ()
336- .collect (Collectors .toList ())
337- )
333+ + Strings .collectionToCommaDelimitedString (IndexPrivilege .names ().stream ().sorted ().collect (Collectors .toList ()))
338334 + "] or a pattern over one of the available index"
339335 + " actions" ;
340336
341-
342337 final ResponseException exception = expectThrows (ResponseException .class , () -> upsertRoles (String .format ("""
343338 {
344339 "roles": {
You can’t perform that action at this time.
0 commit comments