[TEST] Updated known actions names test
Closes elastic/elasticsearch#51 Original commit: elastic/x-pack-elasticsearch@9e051f9fb6
This commit is contained in:
parent
4fa7abd7d6
commit
8a7764fb50
|
@ -7,7 +7,6 @@ package org.elasticsearch.shield.authz;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.reflect.ClassPath;
|
import com.google.common.reflect.ClassPath;
|
||||||
import org.apache.lucene.util.LuceneTestCase;
|
|
||||||
import org.elasticsearch.ElasticsearchIllegalStateException;
|
import org.elasticsearch.ElasticsearchIllegalStateException;
|
||||||
import org.elasticsearch.action.Action;
|
import org.elasticsearch.action.Action;
|
||||||
import org.elasticsearch.common.io.Streams;
|
import org.elasticsearch.common.io.Streams;
|
||||||
|
@ -21,9 +20,7 @@ import java.io.InputStream;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Modifier;
|
import java.lang.reflect.Modifier;
|
||||||
|
|
||||||
import static org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
|
||||||
import static org.hamcrest.Matchers.hasItem;
|
import static org.hamcrest.Matchers.hasItem;
|
||||||
import static org.hamcrest.Matchers.is;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -63,13 +60,6 @@ public class KnownActionsSanityCheckTests extends ElasticsearchTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test @AwaitsFix(bugUrl = "waiting for core to change the action names")
|
|
||||||
public void testIndexTemplateActionIsIndicesAction() throws Exception {
|
|
||||||
assertThat(knownActions.contains("indices:admin/template/delete"), is(true));
|
|
||||||
assertThat(knownActions.contains("indices:admin/template/get"), is(true));
|
|
||||||
assertThat(knownActions.contains("indices:admin/template/put"), is(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
private String extractActionName(Class clazz) throws Exception {
|
private String extractActionName(Class clazz) throws Exception {
|
||||||
if (Modifier.isAbstract(clazz.getModifiers())) {
|
if (Modifier.isAbstract(clazz.getModifiers())) {
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue