@@ -444,6 +444,39 @@ func TestGetAzcopyJob(t *testing.T) {
444
444
expectedPercent : "100.0" ,
445
445
expectedErr : nil ,
446
446
},
447
+ {
448
+ desc : "run exec parse azcopy job CompletedWithErrors" ,
449
+ 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" ,
450
+ listErr : nil ,
451
+ enableShow : false ,
452
+ showStr : "" ,
453
+ showErr : nil ,
454
+ expectedJobState : AzcopyJobCompletedWithErrors ,
455
+ expectedPercent : "100.0" ,
456
+ expectedErr : nil ,
457
+ },
458
+ {
459
+ desc : "run exec parse azcopy job CompletedWithSkipped" ,
460
+ 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" ,
461
+ listErr : nil ,
462
+ enableShow : false ,
463
+ showStr : "" ,
464
+ showErr : nil ,
465
+ expectedJobState : AzcopyJobCompletedWithSkipped ,
466
+ expectedPercent : "100.0" ,
467
+ expectedErr : nil ,
468
+ },
469
+ {
470
+ desc : "run exec parse azcopy job CompletedWithErrorsAndSkipped" ,
471
+ 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" ,
472
+ listErr : nil ,
473
+ enableShow : false ,
474
+ showStr : "" ,
475
+ showErr : nil ,
476
+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
477
+ expectedPercent : "100.0" ,
478
+ expectedErr : nil ,
479
+ },
447
480
{
448
481
desc : "run exec get error in azcopy jobs show" ,
449
482
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" ,
@@ -542,6 +575,27 @@ func TestParseAzcopyJobList(t *testing.T) {
542
575
expectedJobState : AzcopyJobCompleted ,
543
576
expectedErr : nil ,
544
577
},
578
+ {
579
+ desc : "parse azcopy job CompletedWithErrors" ,
580
+ 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" ,
581
+ expectedJobid : "" ,
582
+ expectedJobState : AzcopyJobCompletedWithErrors ,
583
+ expectedErr : nil ,
584
+ },
585
+ {
586
+ desc : "parse azcopy job CompletedWithSkipped" ,
587
+ 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" ,
588
+ expectedJobid : "" ,
589
+ expectedJobState : AzcopyJobCompletedWithSkipped ,
590
+ expectedErr : nil ,
591
+ },
592
+ {
593
+ desc : "parse azcopy job CompletedWithErrorsAndSkipped" ,
594
+ 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" ,
595
+ expectedJobid : "" ,
596
+ expectedJobState : AzcopyJobCompletedWithErrorsAndSkipped ,
597
+ expectedErr : nil ,
598
+ },
545
599
{
546
600
desc : "parse azcopy job InProgress" ,
547
601
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