Skip to content

Commit 5147535

Browse files
committed
wip
Signed-off-by: Kohya Shiozaki <[email protected]>
1 parent d6c63dc commit 5147535

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

test/e2e/delete_incremental_backup_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ func deleteIncrementalBackupTestSuite() {
123123
}, "10s", "1s").WithContext(ctx).Should(Succeed())
124124
})
125125

126+
// Description:
127+
// Deletion Job fails with checksum mismatch when checksum file is corrupted.
128+
// Arrange:
129+
// - Create full and incremental backups.
130+
// - Corrupt the incremental diff checksum file.
131+
// Act:
132+
// - Request deletion of the incremental backup.
133+
// Assert:
134+
// - FinBackup sets ChecksumMismatched=True.
126135
It("should fail deletion job when checksum file is corrupted", func(ctx SpecContext) {
127136
// Arrange
128137
pod := CreatePodForBlockPVC(ctx, k8sClient, pvc)

test/e2e/incremental_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,15 @@ func incrementalBackupTestSuite() {
283283
VerifySizeOfRestorePVC(ctx, ctrlClient, restore)
284284
})
285285

286+
// Description:
287+
// Backup Job fails with checksum mismatch when checksum file is corrupted.
288+
// Arrange:
289+
// - Create full backup for an isolated PVC.
290+
// - Corrupt raw checksum file before creating another backup.
291+
// Act:
292+
// - Create another backup on the same PVC.
293+
// Assert:
294+
// - FinBackup sets ChecksumMismatched=True.
286295
It("should fail backup job when checksum file is corrupted", func(ctx SpecContext) {
287296
By("preparing an isolated PVC for checksum corruption test")
288297
localNS := NewNamespace(utils.GetUniqueName("checksum-ns-"))

test/e2e/verification_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,15 @@ func verificationTestSuite() {
292292
},
293293
)
294294

295+
// Description:
296+
// Verification Job fails when the diff checksum file is corrupted.
297+
// Arrange:
298+
// - Create full backup, then modify data and create incremental backup.
299+
// - Corrupt the diff checksum file.
300+
// Act:
301+
// - Wait for ChecksumMismatched condition.
302+
// Assert:
303+
// - FinBackup sets ChecksumMismatched=True.
295304
It("should fail verification when diff checksum file is corrupted", func(ctx SpecContext) {
296305
// Arrange
297306
fullBackup := CreateBackup(ctx, ctrlClient, rookNamespace, pvc, nodes[0])

0 commit comments

Comments
 (0)