Skip to content

Commit

Permalink
fix klint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Riya Saxena <[email protected]>
  • Loading branch information
riysaxen-amzn committed Feb 29, 2024
1 parent 99e3114 commit 577850a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class GetFindingsRequest : ActionRequest {
findingIndexName: String? = null,
monitorIds: List<String>? = null,
severity: String? = null,
detectionType: String? = null ,
detectionType: String? = null,
findingIds: List<String>? = null,
startTime: Instant? = null,
endTime: Instant? = null

Check warning on line 33 in src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt

View check run for this annotation

Codecov / codecov/patch

src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt#L28-L33

Added lines #L28 - L33 were not covered by tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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())
}
Expand Down

0 comments on commit 577850a

Please sign in to comment.