@@ -1079,7 +1079,7 @@ func TestStartContainerWithContext(t *testing.T) {
10791079
10801080 startError := make (chan error )
10811081 go func () {
1082- startError <- client .StartContainerWithContext (ctx , id , & HostConfig {})
1082+ startError <- client .StartContainerWithContext (id , & HostConfig {}, ctx )
10831083 }()
10841084 select {
10851085 case err := <- startError :
@@ -1154,7 +1154,7 @@ func TestStopContainerWithContext(t *testing.T) {
11541154
11551155 stopError := make (chan error )
11561156 go func () {
1157- stopError <- client .StopContainerWithContext (ctx , id , 10 )
1157+ stopError <- client .StopContainerWithContext (id , 10 , ctx )
11581158 }()
11591159 select {
11601160 case err := <- stopError :
@@ -2729,7 +2729,7 @@ func TestInspectContainerWhenContextTimesOut(t *testing.T) {
27292729 ctx , cancel := context .WithTimeout (context .TODO (), 100 * time .Millisecond )
27302730 defer cancel ()
27312731
2732- _ , err := client .InspectContainerWithContext (ctx , "id" )
2732+ _ , err := client .InspectContainerWithContext ("id" , ctx )
27332733 if err != context .DeadlineExceeded {
27342734 t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
27352735 }
@@ -2744,7 +2744,7 @@ func TestStartContainerWhenContextTimesOut(t *testing.T) {
27442744 ctx , cancel := context .WithTimeout (context .TODO (), 100 * time .Millisecond )
27452745 defer cancel ()
27462746
2747- err := client .StartContainerWithContext (ctx , "id" , nil )
2747+ err := client .StartContainerWithContext ("id" , nil , ctx )
27482748 if err != context .DeadlineExceeded {
27492749 t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
27502750 }
@@ -2759,7 +2759,7 @@ func TestStopContainerWhenContextTimesOut(t *testing.T) {
27592759 ctx , cancel := context .WithTimeout (context .TODO (), 50 * time .Millisecond )
27602760 defer cancel ()
27612761
2762- err := client .StopContainerWithContext (ctx , "id" , 10 )
2762+ err := client .StopContainerWithContext ("id" , 10 , ctx )
27632763 if err != context .DeadlineExceeded {
27642764 t .Errorf ("Expected 'DeadlineExceededError', got: %v" , err )
27652765 }
0 commit comments