From 577850a1ddfa3741ad5480f4bfe787ece0b5b4c2 Mon Sep 17 00:00:00 2001 From: Riya Saxena Date: Thu, 29 Feb 2024 12:16:14 -0800 Subject: [PATCH] fix klint errors Signed-off-by: Riya Saxena --- .../commons/alerting/action/GetFindingsRequest.kt | 2 +- .../commons/alerting/action/GetFindingsRequestTests.kt | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt index 79b3cef1..8ad2ff82 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt @@ -27,7 +27,7 @@ class GetFindingsRequest : ActionRequest { findingIndexName: String? = null, monitorIds: List? = null, severity: String? = null, - detectionType: String? = null , + detectionType: String? = null, findingIds: List? = null, startTime: Instant? = null, endTime: Instant? = null diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt index b77d2609..67014d1b 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt @@ -12,12 +12,10 @@ import java.time.Instant internal class GetFindingsRequestTests { - @Test fun `test get findings request`() { val table = Table("asc", "sortString", null, 1, 0, "") - - val req = GetFindingsRequest("2121", table, "1", "finding_index_name", listOf("1", "2"), "severity", "detectionType", listOf("id1", "id2", ), Instant.now(), Instant.now().plusSeconds(30000)) + val req = GetFindingsRequest("2121", table, "1", "finding_index_name", listOf("1", "2"), "severity", "detectionType", listOf("id1", "id2"), Instant.now(), Instant.now().plusSeconds(30000)) assertNotNull(req) val out = BytesStreamOutput() @@ -41,8 +39,7 @@ internal class GetFindingsRequestTests { @Test fun `test validate returns null`() { val table = Table("asc", "sortString", null, 1, 0, "") - - val req = GetFindingsRequest("2121", table, "1", "active", listOf("1", "2"), "severity", "detectionType", listOf("id1", "id2", ), Instant.now(), Instant.now().plusSeconds(30000)) + val req = GetFindingsRequest("2121", table, "1", "active", listOf("1", "2"), "severity", "detectionType", listOf("id1", "id2"), Instant.now(), Instant.now().plusSeconds(30000)) assertNotNull(req) assertNull(req.validate()) }