@@ -463,31 +463,36 @@ func TestJobs(t *testing.T) {
463463 name : "unknown flag" ,
464464 statusCode : http .StatusOK ,
465465 args : []string {"jobs" , "--badflag" },
466+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
466467 wantErrOutputRegex : "unknown flag: --badflag" ,
467468 },
468469 {
469- name : "500 bad status code" ,
470- statusCode : http .StatusInternalServerError ,
471- wantErrText : "500 Internal Server Error" ,
472- args : []string {"jobs" },
470+ name : "500 bad status code" ,
471+ statusCode : http .StatusInternalServerError ,
472+ wantErrText : "500 Internal Server Error" ,
473+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
474+ args : []string {"jobs" },
473475 },
474476 {
475- name : "404 bad status code" ,
476- statusCode : http .StatusNotFound ,
477- wantErrText : "404 Not Found" ,
478- args : []string {"jobs" },
477+ name : "404 bad status code" ,
478+ statusCode : http .StatusNotFound ,
479+ wantErrText : "404 Not Found" ,
480+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
481+ args : []string {"jobs" },
479482 },
480483 {
481484 name : "get jobs table output" ,
482485 statusCode : http .StatusOK ,
483486 args : []string {"jobs" },
487+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
484488 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*4[\\ s]*10f259e906e5[\\ s]*running.fmw[\\ s]*PULLED[\\ s]*1[\\ s]*austinApartments.fmw[\\ s]*QUEUED[\\ s]*3[\\ s]*387f74cd4e1f[\\ s]*austinApartments.fmw[\\ s]*SUCCESS[\\ s]*2[\\ s]*10f259e906e5[\\ s]*none2none.fmw[\\ s]*FME_FAILURE[\\ s]*$" ,
485489 httpServer : httptest .NewServer (http .HandlerFunc (customHttpServerHandler )),
486490 },
487491 {
488492 name : "get jobs all table output" ,
489493 statusCode : http .StatusOK ,
490494 args : []string {"jobs" , "--all" },
495+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
491496 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*4[\\ s]*10f259e906e5[\\ s]*running.fmw[\\ s]*PULLED[\\ s]*1[\\ s]*austinApartments.fmw[\\ s]*QUEUED[\\ s]*3[\\ s]*387f74cd4e1f[\\ s]*austinApartments.fmw[\\ s]*SUCCESS[\\ s]*2[\\ s]*10f259e906e5[\\ s]*none2none.fmw[\\ s]*FME_FAILURE[\\ s]*$" ,
492497 httpServer : httptest .NewServer (http .HandlerFunc (customHttpServerHandler )),
493498 },
@@ -496,132 +501,151 @@ func TestJobs(t *testing.T) {
496501 statusCode : http .StatusOK ,
497502 body : responseV3Running ,
498503 args : []string {"jobs" , "--running" },
504+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
499505 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*4[\\ s]*10f259e906e5[\\ s]*running.fmw[\\ s]*PULLED[\\ s]*$" ,
500506 },
501507 {
502508 name : "get jobs active" ,
503509 statusCode : http .StatusOK ,
504510 body : responseV3Active ,
505511 args : []string {"jobs" , "--active" },
512+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
506513 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*4[\\ s]*10f259e906e5[\\ s]*running.fmw[\\ s]*PULLED[\\ s]*1[\\ s]*austinApartments.fmw[\\ s]*QUEUED[\\ s]*$" ,
507514 },
508515 {
509516 name : "get jobs completed" ,
510517 statusCode : http .StatusOK ,
511518 body : responseV3Completed ,
512519 args : []string {"jobs" , "--completed" },
520+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
513521 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*3[\\ s]*387f74cd4e1f[\\ s]*austinApartments.fmw[\\ s]*SUCCESS[\\ s]*2[\\ s]*10f259e906e5[\\ s]*none2none.fmw[\\ s]*FME_FAILURE[\\ s]*$" ,
514522 },
515523 {
516524 name : "get jobs queued" ,
517525 statusCode : http .StatusOK ,
518526 body : responseV3Queued ,
519527 args : []string {"jobs" , "--queued" },
528+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
520529 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*1[\\ s]*austinApartments.fmw[\\ s]*QUEUED[\\ s]*$" ,
521530 },
522531 {
523532 name : "get jobs queued no headers" ,
524533 statusCode : http .StatusOK ,
525534 body : responseV3Queued ,
526535 args : []string {"jobs" , "--queued" , "--no-headers" },
536+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
527537 wantOutputRegex : "^[\\ s]*1[\\ s]*austinApartments.fmw[\\ s]*QUEUED[\\ s]*$" ,
528538 },
529539 {
530540 name : "get jobs queued json" ,
531541 statusCode : http .StatusOK ,
532542 args : []string {"jobs" , "--queued" , "--json" },
533543 body : responseV3Queued ,
544+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
534545 wantOutputJson : responseV3Queued ,
535546 },
536547 {
537548 name : "get jobs queued json output type" ,
538549 statusCode : http .StatusOK ,
539550 args : []string {"jobs" , "--queued" , "--output=json" },
540551 body : responseV3Queued ,
552+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
541553 wantOutputJson : responseV3Queued ,
542554 },
543555 {
544- name : "workspace flag requires repository" ,
545- statusCode : http .StatusOK ,
546- args : []string {"jobs" , "--workspace" , "austinApartments.fmw" },
547- wantErrText : "required flag(s) \" repository\" not set" ,
548- body : responseV3Completed ,
556+ name : "workspace flag requires repository" ,
557+ statusCode : http .StatusOK ,
558+ args : []string {"jobs" , "--workspace" , "austinApartments.fmw" },
559+ wantErrText : "required flag(s) \" repository\" not set" ,
560+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
561+ body : responseV3Completed ,
549562 },
550563 {
551- name : "queued and active can't both be specified" ,
552- statusCode : http .StatusOK ,
553- args : []string {"jobs" , "--queued" , "--active" },
554- wantErrText : "if any flags in the group [active queued] are set none of the others can be; [active queued] were all set" ,
555- body : responseV3Completed ,
564+ name : "queued and active can't both be specified" ,
565+ statusCode : http .StatusOK ,
566+ args : []string {"jobs" , "--queued" , "--active" },
567+ wantErrText : "if any flags in the group [active queued] are set none of the others can be; [active queued] were all set" ,
568+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
569+ body : responseV3Completed ,
556570 },
557571 {
558- name : "running and active can't both be specified" ,
559- statusCode : http .StatusOK ,
560- args : []string {"jobs" , "--running" , "--active" },
561- wantErrText : "if any flags in the group [active running] are set none of the others can be; [active running] were all set" ,
562- body : responseV3Completed ,
572+ name : "running and active can't both be specified" ,
573+ statusCode : http .StatusOK ,
574+ args : []string {"jobs" , "--running" , "--active" },
575+ wantErrText : "if any flags in the group [active running] are set none of the others can be; [active running] were all set" ,
576+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
577+ body : responseV3Completed ,
563578 },
564579 {
565580 name : "get jobs by repository" ,
566581 statusCode : http .StatusOK ,
567582 args : []string {"jobs" , "--repository" , "Samples" },
568583 wantFormParams : map [string ]string {"repository" : "Samples" },
584+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
569585 body : responseV3Completed ,
570586 },
571587 {
572588 name : "get jobs by workspace" ,
573589 statusCode : http .StatusOK ,
574590 args : []string {"jobs" , "--repository" , "Samples" , "--workspace" , "austinApartments.fmw" },
575591 wantFormParams : map [string ]string {"workspace" : "austinApartments.fmw" , "repository" : "Samples" },
592+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
576593 body : responseV3Completed ,
577594 },
578595 {
579596 name : "get jobs by source id" ,
580597 statusCode : http .StatusOK ,
581598 args : []string {"jobs" , "--source-id" , "some-source-id" },
582599 wantFormParams : map [string ]string {"sourceID" : "some-source-id" },
600+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
583601 body : responseV3Completed ,
584602 },
585603 {
586604 name : "get jobs by user" ,
587605 statusCode : http .StatusOK ,
588606 args : []string {"jobs" , "--user-name" , "admin" },
589607 wantFormParams : map [string ]string {"userName" : "admin" },
608+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
590609 body : responseV3Completed ,
591610 },
592611 {
593612 name : "get jobs by source-type" ,
594613 statusCode : http .StatusOK ,
595614 args : []string {"jobs" , "--source-type" , "source" },
596615 wantFormParams : map [string ]string {"sourceType" : "source" },
616+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
597617 body : responseV3Completed ,
598618 },
599619 {
600620 name : "get jobs completed custom columns" ,
601621 statusCode : http .StatusOK ,
602622 body : responseV3Completed ,
603623 args : []string {"jobs" , "--completed" , "--output" , "custom-columns=CPU:.cpuTime,FEATURES OUTPUT:.result.numFeaturesOutput" },
624+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
604625 wantOutputRegex : "^[\\ s]*CPU[\\ s]*FEATURES OUTPUT[\\ s]*994[\\ s]*49[\\ s]*697[\\ s]*0[\\ s]*$" ,
605626 },
606627 {
607628 name : "get single job" ,
608629 statusCode : http .StatusOK ,
609630 args : []string {"jobs" , "--id" , "1" },
610631 body : responseV3SingleJob ,
632+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
611633 wantOutputRegex : "^[\\ s]*JOB ID[\\ s]*ENGINE NAME[\\ s]*WORKSPACE[\\ s]*STATUS[\\ s]*1[\\ s]*145929514b24[\\ s]*none2none.fmw[\\ s]*ABORTED[\\ s]*$" ,
612634 },
613635 {
614636 name : "get single job json" ,
615637 statusCode : http .StatusOK ,
616638 args : []string {"jobs" , "--id" , "1" , "--json" },
617639 body : responseV3SingleJob ,
640+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
618641 wantOutputJson : responseV3SingleJobOutput ,
619642 },
620643 {
621- name : "get single job does not exist" ,
622- statusCode : http .StatusNotFound ,
623- args : []string {"jobs" , "--id" , "243" },
624- wantErrText : "404 Not Found" ,
644+ name : "get single job does not exist" ,
645+ statusCode : http .StatusNotFound ,
646+ args : []string {"jobs" , "--id" , "243" },
647+ fmeflowBuild : 24733 , // Force V3 API usage (<= 25208 threshold)
648+ wantErrText : "404 Not Found" ,
625649 },
626650 }
627651
0 commit comments