Nitfix for SecurityDocumentationIT dad6f1c9fe

This commit is contained in:
Albert Zaharovits 2018-12-10 11:54:50 +02:00
parent dad6f1c9fe
commit 0b1e7e96be
1 changed files with 3 additions and 1 deletions

View File

@ -1023,12 +1023,14 @@ public class SecurityDocumentationIT extends ESRestHighLevelClientTestCase {
RestHighLevelClient client = highLevelClient(); RestHighLevelClient client = highLevelClient();
{ {
// tag::put-role-execute // tag::put-role-request
final Role role = Role.builder() final Role role = Role.builder()
.name("testPutRole") .name("testPutRole")
.clusterPrivileges(randomSubsetOf(1, Role.ClusterPrivilegeName.ALL_ARRAY)) .clusterPrivileges(randomSubsetOf(1, Role.ClusterPrivilegeName.ALL_ARRAY))
.build(); .build();
final PutRoleRequest request = new PutRoleRequest(role, RefreshPolicy.NONE); final PutRoleRequest request = new PutRoleRequest(role, RefreshPolicy.NONE);
// end::put-role-request
// tag::put-role-execute
final PutRoleResponse response = client.security().putRole(request, RequestOptions.DEFAULT); final PutRoleResponse response = client.security().putRole(request, RequestOptions.DEFAULT);
// end::put-role-execute // end::put-role-execute
// tag::put-role-response // tag::put-role-response