Skip to content

Commit

Permalink
fix findings index schema version tsts
Browse files Browse the repository at this point in the history
Signed-off-by: Surya Sashank Nistala <[email protected]>
  • Loading branch information
eirsep committed Mar 14, 2024
1 parent b5b9e34 commit e74b166
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class AlertIndicesIT : AlertingRestTestCase() {

putFindingMappings(
AlertIndices.findingMapping().trimStart('{').trimEnd('}')
.replace("\"schema_version\": 3", "\"schema_version\": 0")
.replace("\"schema_version\": 4", "\"schema_version\": 0")
)
assertIndexExists(AlertIndices.FINDING_HISTORY_WRITE_INDEX)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 0)
Expand All @@ -89,7 +89,7 @@ class AlertIndicesIT : AlertingRestTestCase() {
executeMonitor(trueMonitor.id)
assertIndexExists(AlertIndices.FINDING_HISTORY_WRITE_INDEX)
verifyIndexSchemaVersion(ScheduledJob.SCHEDULED_JOBS_INDEX, 8)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 3)
verifyIndexSchemaVersion(AlertIndices.FINDING_HISTORY_WRITE_INDEX, 4)
}

fun `test alert index gets recreated automatically if deleted`() {
Expand Down

0 comments on commit e74b166

Please sign in to comment.