Skip to content

Commit 4e55894

Browse files
authored
Merge pull request #226 from avalluri/fix-listvolumes
sanity: Disable ListVolumes pagination test
2 parents 1d38cfa + 46ef6af commit 4e55894

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pkg/sanity/controller.go

+11-2
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,18 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity
259259
Expect(len(vols.GetEntries())).To(Equal(totalVols))
260260
})
261261

262-
It("pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted", func() {
262+
// Disabling this below case as it is fragile and results are inconsistent
263+
// when no of volumes are different. The test might fail on a driver
264+
// which implements the pagination based on index just by altering
265+
// minVolCount := 4 and maxEntries := 3
266+
// Related discussion links:
267+
// https://github.com/intel/pmem-csi/pull/424#issuecomment-540499938
268+
// https://github.com/kubernetes-csi/csi-test/issues/223
269+
XIt("pagination should detect volumes added between pages and accept tokens when the last volume from a page is deleted", func() {
263270
// minVolCount is the minimum number of volumes expected to exist,
264271
// based on which paginated volume listing is performed.
265272
minVolCount := 3
266-
// maxEntried is the maximum entries in list volume request.
273+
// maxEntries is the maximum entries in list volume request.
267274
maxEntries := 2
268275
// existing_vols to keep a record of the volumes that should exist
269276
existing_vols := map[string]bool{}
@@ -358,6 +365,8 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity
358365
Expect(err).NotTo(HaveOccurred())
359366
Expect(vol).NotTo(BeNil())
360367
Expect(vol.Volume).NotTo(BeNil())
368+
// Register the volume so it's automatically cleaned
369+
cl.RegisterVolume(vol.Volume.VolumeId, VolumeInfo{VolumeID: vol.Volume.VolumeId})
361370
existing_vols[vol.Volume.VolumeId] = true
362371

363372
vols, err = c.ListVolumes(

0 commit comments

Comments
 (0)