Skip to content

Commit 483318c

Browse files
committed
tests: skip sparse check for imageio/vddk
- ImageIO raw images are not passed through any sparsification mechanism - VDDK ones do, but the fake plugin used for testing lies that they're not Signed-off-by: Alex Kalenyuk <[email protected]>
1 parent 7182165 commit 483318c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/import_test.go

+12-1
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,10 @@ var _ = Describe("Import populator", func() {
16381638
})
16391639

16401640
DescribeTable("should import fileSystem PVC", func(expectedMD5 string, originalVirtualSize int, volumeImportSourceFunc func(cdiv1.DataVolumeContentType, bool) error, preallocation, webhookRendering bool) {
1641+
// ImageIO raw images are not passed through any sparsification mechanism
1642+
// VDDK ones do, but the fake plugin used for testing lies that they're not
1643+
skipSparseCheckIDs := []string{"[test_id:11007]", "[test_id:11009]"}
1644+
16411645
pvc = importPopulationPVCDefinition()
16421646

16431647
if webhookRendering {
@@ -1664,12 +1668,19 @@ var _ = Describe("Import populator", func() {
16641668
Expect(err).ToNot(HaveOccurred())
16651669
Expect(md5).To(Equal(expectedMD5))
16661670

1671+
var excluded bool
1672+
for _, id := range skipSparseCheckIDs {
1673+
if strings.Contains(CurrentSpecReport().LeafNodeText, id) {
1674+
excluded = true
1675+
break
1676+
}
1677+
}
16671678
if preallocation {
16681679
By("Verifying the image is preallocated")
16691680
ok, err := f.VerifyImagePreallocated(f.Namespace, pvc)
16701681
Expect(err).ToNot(HaveOccurred())
16711682
Expect(ok).To(BeTrue())
1672-
} else {
1683+
} else if !excluded {
16731684
By("Verifying the image is sparse")
16741685
Expect(f.VerifySparse(f.Namespace, pvc, utils.DefaultImagePath, int64(originalVirtualSize))).To(BeTrue())
16751686
}

0 commit comments

Comments
 (0)