Test: update with new core actions and upgrade api changes
Original commit: elastic/x-pack-elasticsearch@0189cf850f
This commit is contained in:
parent
84c5115889
commit
c01eef8863
|
@ -357,8 +357,7 @@ public class IndexPrivilegeTests extends AbstractPrivilegeTests {
|
|||
assertAccessIsAllowed(user, "GET", "/" + index + "/_analyze", null, analyzeParams);
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_flush");
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_optimize");
|
||||
ImmutableMap<String, String> params = ImmutableMap.of("wait_for_completion", "true");
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_upgrade", null, params);
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_upgrade", null);
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_close");
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_open");
|
||||
assertAccessIsAllowed(user, "POST", "/" + index + "/_cache/clear");
|
||||
|
@ -379,8 +378,7 @@ public class IndexPrivilegeTests extends AbstractPrivilegeTests {
|
|||
assertAccessIsDenied(user, "GET", "/" + index + "/_analyze", null, analyzeParams);
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_flush");
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_optimize");
|
||||
ImmutableMap<String, String> params = ImmutableMap.of("wait_for_completion", "true");
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_upgrade", null, params);
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_upgrade", null);
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_close");
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_open");
|
||||
assertAccessIsDenied(user, "POST", "/" + index + "/_cache/clear");
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.elasticsearch.common.io.PathUtils;
|
|||
import org.elasticsearch.common.io.Streams;
|
||||
import org.elasticsearch.common.util.Callback;
|
||||
import org.elasticsearch.shield.action.ShieldActionModule;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
||||
import org.elasticsearch.test.ShieldIntegrationTest;
|
||||
import org.elasticsearch.license.plugin.LicensePlugin;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -40,6 +41,7 @@ import static org.hamcrest.CoreMatchers.hasItems;
|
|||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
||||
@ClusterScope(numClientNodes = 0, numDataNodes = 1)
|
||||
public class KnownActionsTests extends ShieldIntegrationTest {
|
||||
|
||||
private static ImmutableSet<String> knownActions;
|
||||
|
|
|
@ -33,13 +33,13 @@ indices:admin/mappings/get
|
|||
indices:admin/open
|
||||
indices:admin/optimize
|
||||
indices:admin/refresh
|
||||
indices:admin/seal
|
||||
indices:admin/settings/update
|
||||
indices:admin/shards/search_shards
|
||||
indices:admin/template/delete
|
||||
indices:admin/template/get
|
||||
indices:admin/template/put
|
||||
indices:admin/types/exists
|
||||
indices:admin/upgrade
|
||||
indices:admin/validate/query
|
||||
indices:admin/warmers/delete
|
||||
indices:admin/warmers/get
|
||||
|
@ -48,6 +48,7 @@ indices:monitor/recovery
|
|||
indices:monitor/segments
|
||||
indices:monitor/settings/get
|
||||
indices:monitor/stats
|
||||
indices:monitor/upgrade
|
||||
indices:data/read/count
|
||||
indices:data/read/exists
|
||||
indices:data/read/explain
|
||||
|
@ -73,4 +74,5 @@ indices:data/write/update
|
|||
cluster:admin/plugin/license/get
|
||||
cluster:admin/plugin/license/delete
|
||||
cluster:admin/plugin/license/put
|
||||
cluster:admin/shield/realm/cache/clear
|
||||
cluster:admin/shield/realm/cache/clear
|
||||
internal:indices/admin/upgrade
|
|
@ -14,6 +14,8 @@ indices:admin/mappings/fields/get[index]
|
|||
indices:admin/mappings/fields/get[index][s]
|
||||
indices:admin/optimize[s]
|
||||
indices:admin/refresh[s]
|
||||
indices:admin/upgrade
|
||||
indices:admin/upgrade[s]
|
||||
indices:admin/validate/query[s]
|
||||
indices:data/read/exists[s]
|
||||
indices:data/read/explain[s]
|
||||
|
@ -46,6 +48,8 @@ indices:data/write/index[r]
|
|||
indices:monitor/recovery[s]
|
||||
indices:monitor/segments[s]
|
||||
indices:monitor/stats[s]
|
||||
indices:monitor/upgrade[s]
|
||||
indices:monitor/upgrade
|
||||
internal:cluster/node/index/deleted
|
||||
internal:cluster/node/index_store/deleted
|
||||
internal:cluster/node/mapping/refresh
|
||||
|
@ -78,6 +82,7 @@ internal:index/shard/recovery/start_recovery
|
|||
internal:index/shard/recovery/translog_ops
|
||||
internal:index/termvectors/dfs
|
||||
internal:index/termvectors/dfs[s]
|
||||
internal:indices/admin/upgrade
|
||||
internal:indices/flush/synced/in_flight
|
||||
internal:indices/flush/synced/pre
|
||||
internal:indices/flush/synced/sync
|
||||
|
|
Loading…
Reference in New Issue