Nit fix test randomInt bound

Relates 2b789fa3e6
This commit is contained in:
Albert Zaharovits 2020-01-13 13:25:05 +02:00
parent 2b789fa3e6
commit 4e837599b3
1 changed files with 1 additions and 1 deletions

View File

@ -550,7 +550,7 @@ public class RBACEngineTests extends ESTestCase {
Authentication authentication = mock(Authentication.class);
when(authentication.getUser()).thenReturn(user);
final String patternPrefix = RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.substring(0,
randomIntBetween(1, RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.length() - 2));
randomIntBetween(2, RestrictedIndicesNames.ASYNC_SEARCH_PREFIX.length() - 2));
Role role = Role.builder("role")
.add(FieldPermissions.DEFAULT, null, IndexPrivilege.INDEX, false, patternPrefix + "*")
.build();