@@ -115,6 +115,39 @@ func TestGetAzcopyJob(t *testing.T) {
115
115
expectedPercent : "100.0" ,
116
116
expectedErr : nil ,
117
117
},
118
+ {
119
+ desc : "run exec parse azcopy job CompletedWithErrors" ,
120
+ listStr : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithErrors\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
121
+ listErr : nil ,
122
+ enableShow : false ,
123
+ showStr : "" ,
124
+ showErr : nil ,
125
+ expectedJobState : AzcopyJobCompletedWithErrors ,
126
+ expectedPercent : "100.0" ,
127
+ expectedErr : nil ,
128
+ },
129
+ {
130
+ desc : "run exec parse azcopy job CompletedWithSkipped" ,
131
+ listStr : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithSkipped\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
132
+ listErr : nil ,
133
+ enableShow : false ,
134
+ showStr : "" ,
135
+ showErr : nil ,
136
+ expectedJobState : AzcopyJobCompletedWithSkipped ,
137
+ expectedPercent : "100.0" ,
138
+ expectedErr : nil ,
139
+ },
140
+ {
141
+ desc : "run exec parse azcopy job CompletedWithErrorsAndSkipped" ,
142
+ listStr : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithErrorsAndSkipped\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
143
+ listErr : nil ,
144
+ enableShow : false ,
145
+ showStr : "" ,
146
+ showErr : nil ,
147
+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
148
+ expectedPercent : "100.0" ,
149
+ expectedErr : nil ,
150
+ },
118
151
{
119
152
desc : "run exec get error in azcopy jobs show" ,
120
153
listStr : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: InProgress\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
@@ -247,6 +280,27 @@ func TestParseAzcopyJobList(t *testing.T) {
247
280
expectedJobState : AzcopyJobCompleted ,
248
281
expectedErr : nil ,
249
282
},
283
+ {
284
+ desc : "parse azcopy job CompletedWithErrors" ,
285
+ str : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithErrors\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
286
+ expectedJobid : "" ,
287
+ expectedJobState : AzcopyJobCompletedWithErrors ,
288
+ expectedErr : nil ,
289
+ },
290
+ {
291
+ desc : "parse azcopy job CompletedWithSkipped" ,
292
+ str : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithSkipped\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
293
+ expectedJobid : "" ,
294
+ expectedJobState : AzcopyJobCompletedWithSkipped ,
295
+ expectedErr : nil ,
296
+ },
297
+ {
298
+ desc : "parse azcopy job CompletedWithErrorsAndSkipped" ,
299
+ str : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: CompletedWithErrorsAndSkipped\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
300
+ expectedJobid : "" ,
301
+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
302
+ expectedErr : nil ,
303
+ },
250
304
{
251
305
desc : "parse azcopy job InProgress" ,
252
306
str : "JobId: ed1c3833-eaff-fe42-71d7-513fb065a9d9\n Start Time: Monday, 07-Aug-23 03:29:54 UTC\n Status: InProgress\n Command: copy https://{accountName}.file.core.windows.net/{srcFileshare}{SAStoken} https://{accountName}.file.core.windows.net/{dstFileshare}{SAStoken} --recursive --check-length=false" ,
0 commit comments