@@ -889,7 +889,7 @@ func testWorkflowACL(t *testing.T, acld bool, authorized bool, wantSucceed bool)
889
889
t .Fatalf ("FailUnfinishedTasks(_, %v) = _, %v, wanted no error" , fail , err )
890
890
}
891
891
892
- params := httprouter.Params {{"id" , wfID .String ()}, {"name" , "beep" }}
892
+ params := httprouter.Params {{Key : "id" , Value : wfID .String ()}, {Key : "name" , Value : "beep" }}
893
893
req := httptest .NewRequest (http .MethodPost , path .Join ("/workflows/" , wfID .String (), "tasks" , "beep" , "retry" ), nil )
894
894
req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
895
895
req = req .
WithContext (
context .
WithValue (
req .
Context (),
"email" ,
"[email protected] " ))
@@ -930,7 +930,7 @@ func testWorkflowACL(t *testing.T, acld bool, authorized bool, wantSucceed bool)
930
930
t .Fatalf ("CreateTask(_, %v) = _, %v, wanted no error" , gtg , err )
931
931
}
932
932
933
- params := httprouter.Params {{"id" , wfID .String ()}, {"name" , "approve" }}
933
+ params := httprouter.Params {{Key : "id" , Value : wfID .String ()}, {Key : "name" , Value : "approve" }}
934
934
req := httptest .NewRequest (http .MethodPost , path .Join ("/workflows/" , wfID .String (), "tasks" , "approve" , "approve" ), nil )
935
935
req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
936
936
req = req .
WithContext (
context .
WithValue (
req .
Context (),
"email" ,
"[email protected] " ))
@@ -962,7 +962,7 @@ func testWorkflowACL(t *testing.T, acld bool, authorized bool, wantSucceed bool)
962
962
}
963
963
s .w .markRunning (& workflow.Workflow {ID : wfID }, func () {})
964
964
965
- params := httprouter.Params {{"id" , wfID .String ()}}
965
+ params := httprouter.Params {{Key : "id" , Value : wfID .String ()}}
966
966
req := httptest .NewRequest (http .MethodPost , path .Join ("/workflows/" , wfID .String (), "stop" ), nil )
967
967
req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
968
968
req = req .
WithContext (
context .
WithValue (
req .
Context (),
"email" ,
"[email protected] " ))
@@ -986,7 +986,7 @@ func testWorkflowACL(t *testing.T, acld bool, authorized bool, wantSucceed bool)
986
986
t .Fatalf ("Scheduler.Create() = _, %v, wanted no error" , err )
987
987
}
988
988
989
- params := httprouter.Params {{"id" , strconv .Itoa (int (sched .ID ))}}
989
+ params := httprouter.Params {{Key : "id" , Value : strconv .Itoa (int (sched .ID ))}}
990
990
req := httptest .NewRequest (http .MethodPost , path .Join ("/schedules/" , strconv .Itoa (int (sched .ID )), "delete" ), nil )
991
991
req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
992
992
req = req .
WithContext (
context .
WithValue (
req .
Context (),
"email" ,
"[email protected] " ))
0 commit comments