issue 9659: fix crash on cancel without loading data path

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2026-04-03 14:46:16 +08:00
parent ed2daeedf6
commit ffede3ca6e
5 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -259,8 +259,8 @@ func TestCancelDataUpload(t *testing.T) {
}{
{
name: "no fs backup",
expectedEventReason: datapath.EventReasonCancelled,
expectedEventMsg: "Data path for data upload fake-data-upload canceled",
expectedEventReason: datapath.EventReasonStopped,
expectedEventMsg: "Data path for fake-data-upload exited without start",
expectedErr: datapath.ErrCancelled,
},
}
+2 -2
View File
@@ -203,8 +203,8 @@ func TestCancelDataDownload(t *testing.T) {
}{
{
name: "no fs restore",
expectedEventReason: datapath.EventReasonCancelled,
expectedEventMsg: "Data path for data download fake-data-download canceled",
expectedEventReason: datapath.EventReasonStopped,
expectedEventMsg: "Data path for fake-data-download exited without start",
expectedErr: datapath.ErrCancelled,
},
}
+2 -2
View File
@@ -258,8 +258,8 @@ func TestCancelPodVolumeBackup(t *testing.T) {
}{
{
name: "no fs backup",
expectedEventReason: datapath.EventReasonCancelled,
expectedEventMsg: "Data path for PVB fake-pvb canceled",
expectedEventReason: datapath.EventReasonStopped,
expectedEventMsg: "Data path for fake-pvb exited without start",
expectedErr: datapath.ErrCancelled,
},
}
+2 -2
View File
@@ -284,8 +284,8 @@ func TestCancelPodVolumeRestore(t *testing.T) {
}{
{
name: "no fs restore",
expectedEventReason: datapath.EventReasonCancelled,
expectedEventMsg: "Data path for PVR fake-pvr canceled",
expectedEventReason: datapath.EventReasonStopped,
expectedEventMsg: "Data path for fake-pvr exited without start",
expectedErr: datapath.ErrCancelled,
},
}