Description
The test (in pkg/sanity/controller.go) steps:
Step 1: The test checks how many volumes are already present:
vols, err := c.ListVolumes(
context.Background(),
&csi.ListVolumesRequest{})
totalVols := len(vols.GetEntries())
Step 2: The test adds and deletes a volume
Step 3: The test checks how many volumes are present again
vols, err = c.ListVolumes(
context.Background(),
&csi.ListVolumesRequest{})
Expect(len(vols.GetEntries())).To(Equal(totalVols))
The issue is that if someone else is using the server, the second time ListVolumesResponse.GetEntries is called, it is not guaranteed to be the same as when it was called the first time. The test is not accounting for other volumes being made/deleted while it runs, which can cause it to fail sometimes.