Skip to content

Commit

Permalink
Making variables final
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Jul 9, 2018
1 parent 154d305 commit 39d08ad
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void testKibanaSystemRole() {
});

// Beats management index
String index = ".management-beats";
final String index = ".management-beats";
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:foo").test(index), is(false));
assertThat(kibanaRole.indices().allowedIndicesMatcher("indices:bar").test(index), is(false));
assertThat(kibanaRole.indices().allowedIndicesMatcher(DeleteIndexAction.NAME).test(index), is(false));
Expand Down Expand Up @@ -494,11 +494,11 @@ public void testLogstashSystemRole() {
}

public void testBeatsAdminRole() {
RoleDescriptor roleDescriptor = new ReservedRolesStore().roleDescriptor("beats_admin");
final RoleDescriptor roleDescriptor = new ReservedRolesStore().roleDescriptor("beats_admin");
assertNotNull(roleDescriptor);
assertThat(roleDescriptor.getMetadata(), hasEntry("_reserved", true));

Role beatsAdminRole = Role.builder(roleDescriptor, null).build();
final Role beatsAdminRole = Role.builder(roleDescriptor, null).build();
assertThat(beatsAdminRole.cluster().check(ClusterHealthAction.NAME), is(false));
assertThat(beatsAdminRole.cluster().check(ClusterStateAction.NAME), is(false));
assertThat(beatsAdminRole.cluster().check(ClusterStatsAction.NAME), is(false));
Expand All @@ -512,7 +512,7 @@ public void testBeatsAdminRole() {
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:foo").test(randomAlphaOfLengthBetween(8, 24)),
is(false));

String index = ".management-beats";
final String index = ".management-beats";
logger.info("index name [{}]", index);
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:foo").test(index), is(true));
assertThat(beatsAdminRole.indices().allowedIndicesMatcher("indices:bar").test(index), is(true));
Expand Down

0 comments on commit 39d08ad

Please sign in to comment.