Reflect k8s volume id in test data. Extract aws volume id from k8s value.

This commit is contained in:
Jan Mußler
2020-12-09 15:00:30 +01:00
parent a138767dee
commit 88aab59332
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ func (r *EBSVolumeResizer) GetProviderVolumeID(pv *v1.PersistentVolume) (string,
}
idx := strings.LastIndex(volumeID, constants.EBSVolumeIDStart) + 1
if idx == 0 {
return "", fmt.Errorf("malfored EBS volume id %q", volumeID)
return "", fmt.Errorf("malformed EBS volume id %q", volumeID)
}
return volumeID[idx:], nil
}