UPSTREAM: 66324: Fixing E2E tests for disk resizing
@@ -748,11 +748,11 @@ func (gce *GCECloud) ResizeDisk(diskToResize string, oldSize resource.Quantity,
requestBytes := newSize.Value()
// GCE resizes in chunks of GiBs
- requestGB := volumeutil.RoundUpSize(requestBytes, volumeutil.GIB)
- newSizeQuant := resource.MustParse(fmt.Sprintf("%dG", requestGB))
+ requestGIB := volumeutil.RoundUpSize(requestBytes, volumeutil.GIB)
+ newSizeQuant := resource.MustParse(fmt.Sprintf("%dGi", requestGIB))
// If disk is already of size equal or greater than requested size, we simply return
- if disk.SizeGb >= requestGB {
+ if disk.SizeGb >= requestGIB {
return newSizeQuant, nil
}
@@ -761,7 +761,7 @@ func (gce *GCECloud) ResizeDisk(diskToResize string, oldSize resource.Quantity,
switch zoneInfo := disk.ZoneInfo.(type) {
case singleZone:
mc = newDiskMetricContextZonal("resize", disk.Region, zoneInfo.zone)
- err := gce.manager.ResizeDiskOnCloudProvider(disk, requestGB, zoneInfo.zone)
+ err := gce.manager.ResizeDiskOnCloudProvider(disk, requestGIB, zoneInfo.zone)
if err != nil {
return oldSize, mc.Observe(err)
@@ -774,7 +774,7 @@ func (gce *GCECloud) ResizeDisk(diskToResize string, oldSize resource.Quantity,
}
mc = newDiskMetricContextRegional("resize", disk.Region)
- err := gce.manager.RegionalResizeDiskOnCloudProvider(disk, requestGB)
+ err := gce.manager.RegionalResizeDiskOnCloudProvider(disk, requestGIB)
if err != nil {
return oldSize, mc.Observe(err)
