mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: update snapshot restore e2e to check data consistency
Currently, in rbd snapshot restore and volume clone E2E we are not checking any data consistency after doing snapshot restore or volume clone. Hence, this PR writes the data in the PVC and checks the checksum of the file and verify it with the snapshot or cloned PVC. Signed-off-by: Yati Padia <ypadia@redhat.com>
This commit is contained in:
@ -223,7 +223,7 @@ var _ = Describe("RBD Upgrade Testing", func() {
|
||||
e2elog.Logf("Calculating checksum of %s", filePath)
|
||||
checkSum, err = calculateSHA512sum(f, app, filePath, &opt)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to calculate checksum of %s", filePath)
|
||||
e2elog.Failf("failed to calculate checksum with error %v", err)
|
||||
}
|
||||
|
||||
// pvc clone is only supported from v1.16+
|
||||
@ -293,7 +293,7 @@ var _ = Describe("RBD Upgrade Testing", func() {
|
||||
testFilePath := filepath.Join(mountPath, "testClone")
|
||||
newCheckSum, err := calculateSHA512sum(f, appClone, testFilePath, &opt)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to calculate checksum of %s", testFilePath)
|
||||
e2elog.Failf("failed to calculate checksum with error %v", err)
|
||||
}
|
||||
if strings.Compare(newCheckSum, checkSum) != 0 {
|
||||
e2elog.Failf("The checksum of files did not match, expected %s received %s ", checkSum, newCheckSum)
|
||||
@ -342,7 +342,7 @@ var _ = Describe("RBD Upgrade Testing", func() {
|
||||
testFilePath := filepath.Join(mountPath, "testClone")
|
||||
newCheckSum, err := calculateSHA512sum(f, appClone, testFilePath, &opt)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to calculate checksum of %s", testFilePath)
|
||||
e2elog.Failf("failed to calculate checksum with error %v", err)
|
||||
}
|
||||
if strings.Compare(newCheckSum, checkSum) != 0 {
|
||||
e2elog.Failf("The checksum of files did not match, expected %s received %s ", checkSum, newCheckSum)
|
||||
|
Reference in New Issue
Block a user