Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanity: Disable ListVolumes pagination test #226

Merged
merged 1 commit into from
Oct 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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