We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94a918e commit 4833b7aCopy full SHA for 4833b7a
pkg/driver/controller_server_test.go
@@ -317,6 +317,20 @@ func TestControllerExpandVolume(t *testing.T) {
317
expectedError: nil,
318
expectedSizeGB: 20,
319
},
320
+ {
321
+ name: "Desired size not an exact multiple of BytesInGigabyte",
322
+ volumeID: "vol-123",
323
+ capacityRange: &csi.CapacityRange{
324
+ RequiredBytes: 20*driver.BytesInGigabyte + 1, // 20 GB + 1 byte
325
+ },
326
+ initialVolume: &civogo.Volume{
327
+ ID: "vol-123",
328
+ SizeGigabytes: 10,
329
+ Status: "available",
330
331
+ expectedError: nil,
332
+ expectedSizeGB: 21, // Desired size should be rounded up to 21 GB
333
334
{
335
name: "Volume ID is missing",
336
volumeID: "",
0 commit comments