Skip to content

Commit 519692d

Browse files
authored
Merge pull request #64 from davidz627/fix/requiredBytes
Testing with 'RequiredBytes' should use it as a minimum value according to spec
2 parents 69735e3 + 6cbaea6 commit 519692d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/sanity/controller.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() {
251251
Expect(vol).NotTo(BeNil())
252252
Expect(vol.GetVolume()).NotTo(BeNil())
253253
Expect(vol.GetVolume().GetId()).NotTo(BeEmpty())
254-
Expect(vol.GetVolume().GetCapacityBytes()).To(Equal(size))
254+
Expect(vol.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size))
255255
}
256256
By("cleaning up deleting the volume")
257257
_, err = c.DeleteVolume(
@@ -288,7 +288,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() {
288288
Expect(vol1).NotTo(BeNil())
289289
Expect(vol1.GetVolume()).NotTo(BeNil())
290290
Expect(vol1.GetVolume().GetId()).NotTo(BeEmpty())
291-
Expect(vol1.GetVolume().GetCapacityBytes()).To(Equal(size))
291+
Expect(vol1.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size))
292292
vol2, err := c.CreateVolume(
293293
context.Background(),
294294
&csi.CreateVolumeRequest{
@@ -311,7 +311,7 @@ var _ = Describe("CreateVolume [Controller Server]", func() {
311311
Expect(vol2).NotTo(BeNil())
312312
Expect(vol2.GetVolume()).NotTo(BeNil())
313313
Expect(vol2.GetVolume().GetId()).NotTo(BeEmpty())
314-
Expect(vol2.GetVolume().GetCapacityBytes()).To(Equal(size))
314+
Expect(vol2.GetVolume().GetCapacityBytes()).To(BeNumerically(">=", size))
315315
Expect(vol1.GetVolume().GetId()).To(Equal(vol2.GetVolume().GetId()))
316316

317317
By("cleaning up deleting the volume")

0 commit comments

Comments
 (0)