From 727346da4258ddd8fedca1d6f4bfc9e3f611fbcf Mon Sep 17 00:00:00 2001 From: zhichao-aws Date: Thu, 29 Jun 2023 13:59:32 +0800 Subject: [PATCH] add field remoteStoreIndexShallowCopy in SM TestUtils (#825) Signed-off-by: zhichao-aws (cherry picked from commit 990db5b7d46e10254c4c9e4c0c887f18cf68d33d) --- .../indexmanagement/snapshotmanagement/TestUtils.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/kotlin/org/opensearch/indexmanagement/snapshotmanagement/TestUtils.kt b/src/test/kotlin/org/opensearch/indexmanagement/snapshotmanagement/TestUtils.kt index b4bebcf11..306c582e9 100644 --- a/src/test/kotlin/org/opensearch/indexmanagement/snapshotmanagement/TestUtils.kt +++ b/src/test/kotlin/org/opensearch/indexmanagement/snapshotmanagement/TestUtils.kt @@ -209,6 +209,7 @@ fun mockSnapshotInfo( endTime: Long = randomNonNegativeLong(), reason: String? = null, // reason with valid string leads to FAILED snapshot state policyName: String = "daily-snapshot", + remoteStoreIndexShallowCopy: Boolean = randomBoolean(), ): SnapshotInfo { val result = SnapshotInfo( SnapshotId(name, UUIDs.randomBase64UUID()), @@ -221,6 +222,7 @@ fun mockSnapshotInfo( emptyList(), false, mapOf("sm_policy" to policyName), + remoteStoreIndexShallowCopy ) return result } @@ -232,6 +234,7 @@ fun mockSnapshotInfo( */ fun mockInProgressSnapshotInfo( name: String = randomAlphaOfLength(10), + remoteStoreIndexShallowCopy: Boolean = randomBoolean(), ): SnapshotInfo { val entry = SnapshotsInProgress.Entry( Snapshot("repo", SnapshotId(name, UUIDs.randomBase64UUID())), @@ -246,6 +249,7 @@ fun mockInProgressSnapshotInfo( "", mapOf("sm_policy" to "daily-snapshot"), Version.CURRENT, + remoteStoreIndexShallowCopy ) return SnapshotInfo(entry) }