mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-06 02:49:35 +00:00
fix permissions for REST tests
Original commit: elastic/x-pack-elasticsearch@a157980a47
This commit is contained in:
parent
69b65f613a
commit
9019c979f3
@ -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();
|
||||
}
|
||||
|
@ -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" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user