fix permissions for REST tests

Original commit: elastic/x-pack-elasticsearch@a157980a47
This commit is contained in:
Simon Willnauer 2015-06-16 14:10:15 +02:00
parent 69b65f613a
commit 9019c979f3
2 changed files with 4 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.license.plugin.core.LicenseExpiredException;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.PluginsService;
import org.elasticsearch.shield.ShieldPlugin;
import org.elasticsearch.test.rest.RestTestCandidate;
import org.elasticsearch.watcher.WatcherPlugin;
@ -34,6 +35,7 @@ public class WatcherDisabledLicenseRestTests extends WatcherRestTests {
WatcherPlugin.class.getName() + "," +
(shieldEnabled ? ShieldPlugin.class.getName() + "," : "") +
licensePluginClass().getName())
.put(PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, false)
.put(ShieldSettings.settings(shieldEnabled));
return builder.build();
}

View File

@ -71,6 +71,7 @@ public class WatcherRestTests extends ElasticsearchRestTestCase {
String token = basicAuthHeaderValue("admin", new SecuredString("changeme".toCharArray()));
return Settings.builder()
.put(Headers.PREFIX + ".Authorization", token)
.put(PluginsService.LOAD_PLUGIN_FROM_CLASSPATH, false)
.build();
} else {
return Settings.EMPTY;
@ -120,7 +121,7 @@ public class WatcherRestTests extends ElasticsearchRestTestCase {
public static final String ROLES =
"test:\n" + // a user for the test infra.
" cluster: cluster:monitor/state, cluster:monitor/health, indices:admin/template/delete, cluster:admin/repository/delete, cluster:monitor/nodes/liveness, indices:admin/template/put\n" +
" cluster: cluster:monitor/state, cluster:monitor/health, indices:admin/template/delete, cluster:admin/repository/delete, cluster:monitor/nodes/liveness, indices:admin/template/put, cluster:admin/delete\n" +
" indices:\n" +
" '*': all\n" +
"\n" +