Skip to content

Commit

Permalink
test/e2e: multik8s: check middle snapshots are deleted
Browse files Browse the repository at this point in the history
Signed-off-by: Ryotaro Banno <[email protected]>
  • Loading branch information
ushitora-anqou committed Feb 19, 2025
1 parent d76d9bb commit d724dbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/e2e/multik8s/replication/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ func replicationTestSuite() { //nolint:gocyclo
return nil
}).Should(Succeed())

// Make sure snapshots are correctly created.
primarySnaps, err := ListRBDSnapshotsInPVC(PrimaryK8sCluster, namespace, pvcName)
Expect(err).NotTo(HaveOccurred())
Expect(len(primarySnaps)).To(Equal(1))
Expect(primarySnaps[0].Name).To(Equal(backupName))
secondarySnaps, err := ListRBDSnapshotsInPVC(SecondaryK8sCluster, namespace, pvcName)
Expect(err).NotTo(HaveOccurred())
Expect(len(secondarySnaps)).To(Equal(1)) // middle snapshots should be deleted.
Expect(secondarySnaps[0].Name).To(Equal(backupName))

WaitTemporaryResourcesDeleted(ctx, primaryMB, secondaryMB)
EnsureCorrectRestoration(PrimaryK8sCluster, ctx, namespace, backupName, restoreName, writtenDataHash)
EnsureCorrectRestoration(SecondaryK8sCluster, ctx, namespace, backupName, restoreName, writtenDataHash)
Expand Down

0 comments on commit d724dbf

Please sign in to comment.