Skip to content

Commit

Permalink
add field remoteStoreIndexShallowCopy in SM TestUtils (#825)
Browse files Browse the repository at this point in the history
Signed-off-by: zhichao-aws <[email protected]>
  • Loading branch information
zhichao-aws committed Jun 29, 2023
1 parent 6f9c75a commit 990db5b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,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()),
Expand All @@ -220,6 +221,7 @@ fun mockSnapshotInfo(
emptyList(),
false,
mapOf("sm_policy" to policyName),
remoteStoreIndexShallowCopy
)
return result
}
Expand All @@ -231,6 +233,7 @@ fun mockSnapshotInfo(
*/
fun mockInProgressSnapshotInfo(
name: String = randomAlphaOfLength(10),
remoteStoreIndexShallowCopy: Boolean = randomBoolean(),
): SnapshotInfo {
val entry = SnapshotsInProgress.Entry(
Snapshot("repo", SnapshotId(name, UUIDs.randomBase64UUID())),
Expand All @@ -245,6 +248,7 @@ fun mockInProgressSnapshotInfo(
"",
mapOf("sm_policy" to "daily-snapshot"),
Version.CURRENT,
remoteStoreIndexShallowCopy
)
return SnapshotInfo(entry)
}
Expand Down

0 comments on commit 990db5b

Please sign in to comment.