mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 22:23:15 +00:00
Check the failed phases either when uploading the snapshot in E2E testing (#4162)
When the snapshot uploading is failed, it should not be treat as completed and continue. This commit covers both the phases of in progress and failed when uploading snapshot with vSphere plugin Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
@@ -449,11 +449,12 @@ func waitForVSphereUploadCompletion(ctx context.Context, timeout time.Duration,
|
||||
// Canceled - the operation was canceled, the snapshot ID is not valid
|
||||
if len(comps) == 2 {
|
||||
phase := comps[1]
|
||||
if phase == "New" ||
|
||||
phase == "InProgress" ||
|
||||
phase == "Snapshotted" ||
|
||||
phase == "Uploading" {
|
||||
switch phase {
|
||||
case "Uploaded":
|
||||
case "New", "InProgress", "Snapshotted", "Uploading":
|
||||
complete = false
|
||||
default:
|
||||
return false, fmt.Errorf("unexpected snapshot phase: %s", phase)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user