@@ -1079,7 +1079,7 @@ func TestStartContainerWithContext(t *testing.T) {
1079
1079
1080
1080
startError := make (chan error )
1081
1081
go func () {
1082
- startError <- client .StartContainerWithContext (ctx , id , & HostConfig {})
1082
+ startError <- client .StartContainerWithContext (id , & HostConfig {}, ctx )
1083
1083
}()
1084
1084
select {
1085
1085
case err := <- startError :
@@ -1154,7 +1154,7 @@ func TestStopContainerWithContext(t *testing.T) {
1154
1154
1155
1155
stopError := make (chan error )
1156
1156
go func () {
1157
- stopError <- client .StopContainerWithContext (ctx , id , 10 )
1157
+ stopError <- client .StopContainerWithContext (id , 10 , ctx )
1158
1158
}()
1159
1159
select {
1160
1160
case err := <- stopError :
@@ -2729,7 +2729,7 @@ func TestInspectContainerWhenContextTimesOut(t *testing.T) {
2729
2729
ctx , cancel := context .WithTimeout (context .TODO (), 100 * time .Millisecond )
2730
2730
defer cancel ()
2731
2731
2732
- _ , err := client .InspectContainerWithContext (ctx , "id" )
2732
+ _ , err := client .InspectContainerWithContext ("id" , ctx )
2733
2733
if err != context .DeadlineExceeded {
2734
2734
t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
2735
2735
}
@@ -2744,7 +2744,7 @@ func TestStartContainerWhenContextTimesOut(t *testing.T) {
2744
2744
ctx , cancel := context .WithTimeout (context .TODO (), 100 * time .Millisecond )
2745
2745
defer cancel ()
2746
2746
2747
- err := client .StartContainerWithContext (ctx , "id" , nil )
2747
+ err := client .StartContainerWithContext ("id" , nil , ctx )
2748
2748
if err != context .DeadlineExceeded {
2749
2749
t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
2750
2750
}
@@ -2759,7 +2759,7 @@ func TestStopContainerWhenContextTimesOut(t *testing.T) {
2759
2759
ctx , cancel := context .WithTimeout (context .TODO (), 50 * time .Millisecond )
2760
2760
defer cancel ()
2761
2761
2762
- err := client .StopContainerWithContext (ctx , "id" , 10 )
2762
+ err := client .StopContainerWithContext ("id" , 10 , ctx )
2763
2763
if err != context .DeadlineExceeded {
2764
2764
t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
2765
2765
}
0 commit comments