Skip to content

Commit

Permalink
Merge pull request #226 from avalluri/fix-listvolumes
Browse files Browse the repository at this point in the history
sanity: Disable ListVolumes pagination test
  • Loading branch information
k8s-ci-robot authored Oct 14, 2019
2 parents 1d38cfa + 46ef6af commit 4e55894
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/sanity/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,18 @@ var _ = DescribeSanity("Controller Service [Controller Server]", func(sc *Sanity
Expect(len(vols.GetEntries())).To(Equal(totalVols))
})

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

vols, err = c.ListVolumes(
Expand Down

0 comments on commit 4e55894

Please sign in to comment.