@@ -116,6 +116,39 @@ func TestGetAzcopyJob(t *testing.T) {
116116 expectedPercent : "100.0" ,
117117 expectedErr : nil ,
118118 },
119+ {
120+ desc : "run exec parse azcopy job CompletedWithErrors" ,
121+ 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" ,
122+ listErr : nil ,
123+ enableShow : false ,
124+ showStr : "" ,
125+ showErr : nil ,
126+ expectedJobState : AzcopyJobCompletedWithErrors ,
127+ expectedPercent : "100.0" ,
128+ expectedErr : nil ,
129+ },
130+ {
131+ desc : "run exec parse azcopy job CompletedWithSkipped" ,
132+ 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" ,
133+ listErr : nil ,
134+ enableShow : false ,
135+ showStr : "" ,
136+ showErr : nil ,
137+ expectedJobState : AzcopyJobCompletedWithSkipped ,
138+ expectedPercent : "100.0" ,
139+ expectedErr : nil ,
140+ },
141+ {
142+ desc : "run exec parse azcopy job CompletedWithErrorsAndSkipped" ,
143+ 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" ,
144+ listErr : nil ,
145+ enableShow : false ,
146+ showStr : "" ,
147+ showErr : nil ,
148+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
149+ expectedPercent : "100.0" ,
150+ expectedErr : nil ,
151+ },
119152 {
120153 desc : "run exec get error in azcopy jobs show" ,
121154 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" ,
@@ -248,6 +281,27 @@ func TestParseAzcopyJobList(t *testing.T) {
248281 expectedJobState : AzcopyJobCompleted ,
249282 expectedErr : nil ,
250283 },
284+ {
285+ desc : "parse azcopy job CompletedWithErrors" ,
286+ 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" ,
287+ expectedJobid : "" ,
288+ expectedJobState : AzcopyJobCompletedWithErrors ,
289+ expectedErr : nil ,
290+ },
291+ {
292+ desc : "parse azcopy job CompletedWithSkipped" ,
293+ 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" ,
294+ expectedJobid : "" ,
295+ expectedJobState : AzcopyJobCompletedWithSkipped ,
296+ expectedErr : nil ,
297+ },
298+ {
299+ desc : "parse azcopy job CompletedWithErrorsAndSkipped" ,
300+ 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" ,
301+ expectedJobid : "" ,
302+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
303+ expectedErr : nil ,
304+ },
251305 {
252306 desc : "parse azcopy job InProgress" ,
253307 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