diff --git a/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java index 9e67d40d78f..fe9d1d1c0b0 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/security/audit/index/IndexAuditTrailTests.java @@ -5,6 +5,7 @@ */ package org.elasticsearch.xpack.security.audit.index; +import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.SetOnce; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; @@ -305,6 +306,12 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { auditor.start(true); } + public void testEmptyTestToDeleteAfterResolvingAwaitsFix() { + // At least one test must run for the test suite to pass + assertTrue(true); + } + + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAnonymousAccessDeniedTransport() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -328,6 +335,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAnonymousAccessDeniedRest() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -342,6 +350,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertRequestBody(sourceMap); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedTransport() throws Exception { initialize(); TransportMessage message = randomBoolean() ? new RemoteHostMockMessage() : new LocalHostMockMessage(); @@ -362,6 +371,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedTransportNoToken() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -386,6 +396,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedRest() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -401,6 +412,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertRequestBody(sourceMap); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedRestNoToken() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -416,6 +428,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertRequestBody(sourceMap); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedTransportRealm() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -442,6 +455,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationFailedRestRealm() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -457,6 +471,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertRequestBody(sourceMap); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAccessGranted() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -487,6 +502,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testSystemAccessGranted() throws Exception { initialize(new String[] { "system_access_granted" }, null); TransportMessage message = randomBoolean() ? new RemoteHostMockMessage() : new LocalHostMockMessage(); @@ -501,6 +517,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAccessDenied() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -531,6 +548,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testTamperedRequestRest() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -546,6 +564,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertRequestBody(sourceMap); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testTamperedRequest() throws Exception { initialize(); TransportRequest message = new RemoteHostMockTransportRequest(); @@ -560,6 +579,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testTamperedRequestWithUser() throws Exception { initialize(); TransportRequest message = new RemoteHostMockTransportRequest(); @@ -587,6 +607,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testConnectionGranted() throws Exception { initialize(); InetAddress inetAddress = InetAddress.getLoopbackAddress(); @@ -601,6 +622,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals("default", sourceMap.get("transport_profile")); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testConnectionDenied() throws Exception { initialize(); InetAddress inetAddress = InetAddress.getLoopbackAddress(); @@ -615,6 +637,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals("default", sourceMap.get("transport_profile")); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testRunAsGranted() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -631,6 +654,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testRunAsDenied() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage()); @@ -647,6 +671,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals(sourceMap.get("request"), message.getClass().getSimpleName()); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationSuccessRest() throws Exception { initialize(); RestRequest request = mockRestRequest(); @@ -674,6 +699,7 @@ public class IndexAuditTrailTests extends SecurityIntegTestCase { assertEquals("_realm", sourceMap.get("realm")); } + @LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2115") public void testAuthenticationSuccessTransport() throws Exception { initialize(); TransportMessage message = randomFrom(new RemoteHostMockMessage(), new LocalHostMockMessage(), new MockIndicesTransportMessage());