diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt index 5d6e50d60..86eb3684d 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/DocumentMonitorRunnerIT.kt @@ -1237,7 +1237,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { false ) - val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf()) + val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3") val docLevelInput = DocLevelMonitorInput("description", listOf(dataStreamName), listOf(docQuery)) val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id) @@ -1289,7 +1289,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { false ) - val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf()) + val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3") val docLevelInput = DocLevelMonitorInput("description", listOf(dataStreamName), listOf(docQuery)) val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id) @@ -1351,7 +1351,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { """.trimIndent() ) - val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf()) + val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3") val docLevelInput = DocLevelMonitorInput("description", listOf("$aliasName"), listOf(docQuery)) val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id) @@ -1426,7 +1426,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { rolloverDatastream(dataStreamName2) indexDoc(dataStreamName2, "0", testDoc) - val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf()) + val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3") val docLevelInput = DocLevelMonitorInput("description", listOf("test-datastream*"), listOf(docQuery)) val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id) @@ -1500,7 +1500,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() { rolloverDatastream(dataStreamName) indexDoc(dataStreamName, "0", testDoc) - val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf()) + val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3") val docLevelInput = DocLevelMonitorInput("description", listOf(dataStreamName), listOf(docQuery)) val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id) diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt index d3650460b..bcf326499 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureDestinationRestApiIT.kt @@ -7,10 +7,10 @@ package org.opensearch.alerting.resthandler import org.apache.http.HttpHeaders import org.apache.http.message.BasicHeader +import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix import org.junit.After import org.junit.Before import org.junit.BeforeClass -import org.junit.Ignore import org.opensearch.alerting.ALERTING_GET_DESTINATION_ACCESS import org.opensearch.alerting.AlertingPlugin import org.opensearch.alerting.AlertingRestTestCase @@ -30,7 +30,7 @@ import org.opensearch.test.junit.annotations.TestLogging import java.time.Instant // TODO investigate flaky nature of tests. not reproducible in local but fails in jenkins CI -@Ignore +@AwaitsFix(bugUrl = "") @TestLogging("level:DEBUG", reason = "Debug for tests.") @Suppress("UNCHECKED_CAST") class SecureDestinationRestApiIT : AlertingRestTestCase() { diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailAccountRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailAccountRestApiIT.kt index b8f13f296..0326e88cd 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailAccountRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailAccountRestApiIT.kt @@ -9,10 +9,10 @@ import org.apache.http.HttpHeaders import org.apache.http.entity.ContentType import org.apache.http.entity.StringEntity import org.apache.http.message.BasicHeader +import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix import org.junit.After import org.junit.Before import org.junit.BeforeClass -import org.junit.Ignore import org.opensearch.alerting.ALERTING_GET_EMAIL_ACCOUNT_ACCESS import org.opensearch.alerting.ALERTING_NO_ACCESS_ROLE import org.opensearch.alerting.ALERTING_SEARCH_EMAIL_ACCOUNT_ACCESS @@ -43,7 +43,7 @@ val SEARCH_EMAIL_ACCOUNT_DSL = """ """.trimIndent() // TODO investigate flaky nature of tests. not reproducible in local but fails in jenkins CI -@Ignore +@AwaitsFix(bugUrl = "") class SecureEmailAccountRestApiIT : AlertingRestTestCase() { companion object { diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailGroupsRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailGroupsRestApiIT.kt index 0c1fc85f6..83845cc38 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailGroupsRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureEmailGroupsRestApiIT.kt @@ -9,10 +9,10 @@ import org.apache.http.HttpHeaders import org.apache.http.entity.ContentType import org.apache.http.entity.StringEntity import org.apache.http.message.BasicHeader +import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix import org.junit.After import org.junit.Before import org.junit.BeforeClass -import org.junit.Ignore import org.opensearch.alerting.ALERTING_GET_EMAIL_GROUP_ACCESS import org.opensearch.alerting.ALERTING_SEARCH_EMAIL_GROUP_ACCESS import org.opensearch.alerting.AlertingPlugin @@ -42,7 +42,7 @@ val SEARCH_EMAIL_GROUP_DSL = """ """.trimIndent() // TODO investigate flaky nature of tests. not reproducible in local but fails in jenkins CI -@Ignore +@AwaitsFix(bugUrl = "") @TestLogging("level:DEBUG", reason = "Debug for tests.") @Suppress("UNCHECKED_CAST") class SecureEmailGroupsRestApiIT : AlertingRestTestCase() { diff --git a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt index a52062d9d..6cc6b759e 100644 --- a/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt +++ b/alerting/src/test/kotlin/org/opensearch/alerting/resthandler/SecureMonitorRestApiIT.kt @@ -10,10 +10,10 @@ import org.apache.http.entity.ContentType import org.apache.http.entity.StringEntity import org.apache.http.message.BasicHeader import org.apache.http.nio.entity.NStringEntity +import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix import org.junit.After import org.junit.Before import org.junit.BeforeClass -import org.junit.Ignore import org.opensearch.alerting.ADMIN import org.opensearch.alerting.ALERTING_BASE_URI import org.opensearch.alerting.ALERTING_DELETE_MONITOR_ACCESS @@ -68,7 +68,7 @@ import org.opensearch.search.builder.SearchSourceBuilder import org.opensearch.test.junit.annotations.TestLogging // TODO investigate flaky nature of tests. not reproducible in local but fails in jenkins CI -@Ignore +@AwaitsFix(bugUrl = "") @TestLogging("level:DEBUG", reason = "Debug for tests.") @Suppress("UNCHECKED_CAST") class SecureMonitorRestApiIT : AlertingRestTestCase() { diff --git a/alerting/src/test/resources/bwc/alerting/1.1.0.0/opensearch-alerting-1.1.0.0.zip b/alerting/src/test/resources/bwc/alerting/1.1.0.0/opensearch-alerting-1.1.0.0.zip new file mode 100644 index 000000000..29afea2cd Binary files /dev/null and b/alerting/src/test/resources/bwc/alerting/1.1.0.0/opensearch-alerting-1.1.0.0.zip differ