Skip to content

Commit

Permalink
Fixed unit Test
Browse files Browse the repository at this point in the history
Signed-off-by: Seung Yeon Joo <[email protected]>
  • Loading branch information
Seung Yeon Joo committed Feb 4, 2025
1 parent 918ecc1 commit ad2396b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class AttemptRestoreStepTests : OpenSearchTestCase() {
@Before
fun setup() {
whenever(clusterService.clusterSettings).doReturn(ClusterSettings(Settings.EMPTY, setOf(SNAPSHOT_DENY_LIST)))
whenever(scriptService.compile(any(), eq(TemplateScript.CONTEXT))).doReturn(MockTemplateScript.Factory("snapshot-pattern*"))
whenever(scriptService.compile(any(), eq(TemplateScript.CONTEXT))).doReturn(MockTemplateScript.Factory("snapshot-pattern"))
}

fun `test restore failure with no matching snapshots`() {
Expand All @@ -98,7 +98,7 @@ class AttemptRestoreStepTests : OpenSearchTestCase() {
)
assertEquals(
"Did not get correct failure message",
"Failed to start restore for [index=test], cause: No snapshots found matching pattern [test*]",
"Failed to start restore for [index=test], cause: No snapshots found matching pattern [snapshot-pattern*]",
updatedMetadata.info!!["message"],
)
}
Expand Down

0 comments on commit ad2396b

Please sign in to comment.