Skip to content

Commit

Permalink
compile fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <snistala@amazon.com>
  • Loading branch information
eirsep committed Mar 13, 2024
1 parent 8034a3e commit 88fb671
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {

val index = createTestIndex()

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(index), listOf(docQuery))

val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id)
Expand Down Expand Up @@ -108,7 +108,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val index = createTestIndex()

val docQuery =
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf(), queryFieldNames = listOf("test_field"))
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", queryFieldNames = listOf("test_field"))
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))

val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id)
Expand Down Expand Up @@ -154,7 +154,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val index = createTestIndex()

val docQuery =
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf())
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3")
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))

val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id)
Expand Down Expand Up @@ -199,7 +199,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val docQuery = DocLevelQuery(
query = "test_field:\"us-west-2\"",
name = "3",
fields = listOf(),

queryFieldNames = listOf("wrong_field")
)
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))
Expand Down Expand Up @@ -253,7 +253,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val docQuery = DocLevelQuery(
query = "test_field:\"us-west-2\"",
name = "3",
fields = listOf(),

queryFieldNames = listOf("wrong_field")
)
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))
Expand Down Expand Up @@ -301,7 +301,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val index = createTestIndex()

val docQuery =
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", fields = listOf(), queryFieldNames = listOf("test_field"))
DocLevelQuery(query = "test_field:\"us-west-2\"", name = "3", queryFieldNames = listOf("test_field"))
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))

val action = randomAction(template = randomTemplateScript("Hello {{ctx.monitor.name}}"), destinationId = createDestination().id)
Expand Down Expand Up @@ -349,8 +349,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val docQuery = DocLevelQuery(
query = "test_field:\"us-west-2\"",
name = "3",
fields = listOf(),
queryFieldNames = listOf("wrong_field")

)
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))

Expand Down Expand Up @@ -399,7 +398,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
val docQuery = DocLevelQuery(
query = "test_field:\"us-west-2\"",
name = "3",
fields = listOf(),

queryFieldNames = listOf("wrong_field")
)
val docLevelInput = DocLevelMonitorInput("description", listOf(index), listOf(docQuery))
Expand Down Expand Up @@ -491,7 +490,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
"test_field" : "us-west-2"
}"""

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(testIndex), listOf(docQuery))

val trigger = randomDocumentLevelTrigger(condition = ALWAYS_RUN)
Expand Down Expand Up @@ -537,7 +536,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
"test_field" : "us-east-1"
}"""

val docQuery2 = DocLevelQuery(query = "test_field:\"us-east-1\"", name = "3", fields = listOf())
val docQuery2 = DocLevelQuery(query = "test_field:\"us-east-1\"", name = "3")
val docLevelInput2 = DocLevelMonitorInput("description", listOf(testIndex2), listOf(docQuery2))

val trigger2 = randomDocumentLevelTrigger(condition = ALWAYS_RUN)
Expand Down Expand Up @@ -630,7 +629,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
"test_field" : "us-west-2"
}"""

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(testIndex), listOf(docQuery))

val trigger = randomDocumentLevelTrigger(condition = ALWAYS_RUN)
Expand Down Expand Up @@ -668,7 +667,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
"test_field" : "us-west-2"
}"""

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(testIndex), listOf(docQuery))

val trigger = randomDocumentLevelTrigger(condition = ALWAYS_RUN)
Expand Down Expand Up @@ -960,7 +959,7 @@ class DocumentMonitorRunnerIT : AlertingRestTestCase() {
"test_field" : "us-west-2"
}"""

val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = testQueryName, fields = listOf())
val docQuery = DocLevelQuery(query = "test_field:\"us-west-2\"", name = testQueryName)
val docLevelInput = DocLevelMonitorInput("description", listOf("$testIndexPrefix*"), listOf(docQuery))

val trigger = randomDocumentLevelTrigger(condition = Script("query[name=$testQueryName]"))
Expand Down Expand Up @@ -1839,7 +1838,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)
Expand Down Expand Up @@ -1891,7 +1890,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)
Expand Down Expand Up @@ -1953,7 +1952,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)
Expand Down Expand Up @@ -2028,7 +2027,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)
Expand Down Expand Up @@ -2102,7 +2101,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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,20 +375,20 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() {
val docQuery2 = DocLevelQuery(
query = "source.ip.v6.v2:16645",
name = "4",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery3 = DocLevelQuery(
query = "source.ip.v4.v0:120",
name = "5",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery4 =
DocLevelQuery(
query = "alias.some.fff:\"us-west-2\"",
name = "6",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery5 = DocLevelQuery(
Expand All @@ -401,14 +401,14 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() {
DocLevelQuery(
query = "type.subtype:\"some subtype\"",
name = "8",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery7 =
DocLevelQuery(
query = "supertype.type:\"some type\"",
name = "9",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docLevelInput = DocLevelMonitorInput(
Expand Down Expand Up @@ -469,26 +469,26 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() {
val docQuery1 = DocLevelQuery(
query = "source.ip.v6.v1:12345",
name = "3",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery2 = DocLevelQuery(
query = "source.ip.v6.v2:16645",
name = "4",
fields = listOf(),

queryFieldNames = listOf("source.ip.v6.v2")
)
val docQuery3 = DocLevelQuery(
query = "source.ip.v4.v0:120",
name = "5",
fields = listOf(),

queryFieldNames = listOf("source.ip.v6.v4")
)
val docQuery4 =
DocLevelQuery(
query = "alias.some.fff:\"us-west-2\"",
name = "6",
fields = listOf(),

queryFieldNames = listOf("alias.some.fff")
)
val docQuery5 = DocLevelQuery(
Expand All @@ -501,14 +501,12 @@ class MonitorDataSourcesIT : AlertingSingleNodeTestCase() {
DocLevelQuery(
query = "type.subtype:\"some subtype\"",
name = "8",
fields = listOf(),
queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docQuery7 =
DocLevelQuery(
query = "supertype.type:\"some type\"",
name = "9",
fields = listOf(),
queryFieldNames = listOf("alias.some.fff", "source.ip.v6.v1")
)
val docLevelInput = DocLevelMonitorInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ class WorkflowRestApiIT : AlertingRestTestCase() {
"test_field" : "us-west-2"
}"""

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(testIndex), listOf(docQuery))

val trigger = randomDocumentLevelTrigger(condition = ALWAYS_RUN)
Expand Down

0 comments on commit 88fb671

Please sign in to comment.