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 Mar 13, 2024
1 parent 38c8166 commit 099555b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GetFindingsRequest : ActionRequest {
monitorId: String? = null,
findingIndexName: String? = null,
monitorIds: List<String>? = null,
boolQueryBuilder: BoolQueryBuilder? = null,
boolQueryBuilder: BoolQueryBuilder? = null

Check warning on line 24 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#L24

Added line #L24 was not covered by tests
) : super() {
this.findingId = findingId
this.table = table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.opensearch.common.io.stream.BytesStreamOutput
import org.opensearch.commons.alerting.model.Table
import org.opensearch.core.common.io.stream.StreamInput
import org.opensearch.index.query.QueryBuilders
import java.time.Instant

internal class GetFindingsRequestTests {

Expand All @@ -31,14 +30,13 @@ internal class GetFindingsRequestTests {
assertEquals(table, newReq.table)
assertTrue(newReq.monitorIds!!.contains("1"))
assertTrue(newReq.monitorIds!!.contains("2"))

}

@Test
fun `test validate returns null`() {
val table = Table("asc", "sortString", null, 1, 0, "")
val boolQueryBuilder = QueryBuilders.boolQuery()
val req = GetFindingsRequest("2121", table, "1", "active", listOf("1", "2"), boolQueryBuilder )
val req = GetFindingsRequest("2121", table, "1", "active", listOf("1", "2"), boolQueryBuilder)
assertNotNull(req)
assertNull(req.validate())
}
Expand Down

0 comments on commit 099555b

Please sign in to comment.