Watcher: Fix BasicSecurityTests.testWatcherMonitorRole
The test tried to create a watches index, that could have been created by the test infrastructure already (to check if aliases are supported). relates elastic/x-pack-elasticsearch#837 Original commit: elastic/x-pack-elasticsearch@29714b2368
This commit is contained in:
parent
f49dee89cb
commit
dfc21c56be
|
@ -58,7 +58,9 @@ public class BasicSecurityTests extends AbstractWatcherIntegrationTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWatcherMonitorRole() throws Exception {
|
public void testWatcherMonitorRole() throws Exception {
|
||||||
|
if (client().admin().indices().prepareExists(Watch.INDEX).get().isExists() == false) {
|
||||||
assertAcked(client().admin().indices().prepareCreate(Watch.INDEX));
|
assertAcked(client().admin().indices().prepareCreate(Watch.INDEX));
|
||||||
|
}
|
||||||
|
|
||||||
// stats and get watch apis require at least monitor role:
|
// stats and get watch apis require at least monitor role:
|
||||||
String token = basicAuthHeaderValue("test", new SecuredString("changeme".toCharArray()));
|
String token = basicAuthHeaderValue("test", new SecuredString("changeme".toCharArray()));
|
||||||
|
|
Loading…
Reference in New Issue