@@ -105,7 +105,8 @@ func TestHTTPExecuteGetSuccess(t *testing.T) {
105105 if err != nil {
106106 t .Fatalf ("Initialization error :\n %v" , err )
107107 }
108- err = h .Execute (context .Background ())
108+ ctx := context .Background ()
109+ err = h .Execute (& ctx )
109110 if err != nil {
110111 t .Fatalf ("healthcheck error :\n %v" , err )
111112 }
@@ -155,7 +156,8 @@ func TestHTTPExecuteRegexpSuccess(t *testing.T) {
155156 if err != nil {
156157 t .Fatalf ("Initialization error :\n %v" , err )
157158 }
158- err = h .Execute (context .Background ())
159+ ctx := context .Background ()
160+ err = h .Execute (& ctx )
159161 if err != nil {
160162 t .Fatalf ("healthcheck error :\n %v" , err )
161163 }
@@ -199,7 +201,8 @@ func TestHTTPExecuteRegexpFailure(t *testing.T) {
199201 if err != nil {
200202 t .Fatalf ("Initialization error :\n %v" , err )
201203 }
202- err = h .Execute (context .Background ())
204+ ctx := context .Background ()
205+ err = h .Execute (& ctx )
203206 if err == nil {
204207 t .Fatalf ("Was expecting an error" )
205208 }
@@ -241,7 +244,8 @@ func TestHTTPv6ExecuteSuccess(t *testing.T) {
241244 if err != nil {
242245 t .Fatalf ("Initialization error :\n %v" , err )
243246 }
244- err = h .Execute (context .Background ())
247+ ctx := context .Background ()
248+ err = h .Execute (& ctx )
245249 if err != nil {
246250 t .Fatalf ("healthcheck error :\n %v" , err )
247251 }
@@ -280,7 +284,8 @@ func TestHTTPExecuteFailure(t *testing.T) {
280284 if err != nil {
281285 t .Fatalf ("Initialization error :\n %v" , err )
282286 }
283- err = h .Execute (context .Background ())
287+ ctx := context .Background ()
288+ err = h .Execute (& ctx )
284289 if err == nil {
285290 t .Fatalf ("Was expecting an error" )
286291 }
@@ -408,7 +413,8 @@ func TestHTTPExecuteSourceIP(t *testing.T) {
408413 if err != nil {
409414 t .Fatalf ("Initialization error :\n %v" , err )
410415 }
411- err = h .Execute (context .Background ())
416+ ctx := context .Background ()
417+ err = h .Execute (& ctx )
412418 if err != nil {
413419 t .Fatalf ("healthcheck error :\n %v" , err )
414420 }
@@ -471,7 +477,8 @@ func TestHTTPExecutePostSuccess(t *testing.T) {
471477 if err != nil {
472478 t .Fatalf ("Initialization error :\n %v" , err )
473479 }
474- err = h .Execute (context .Background ())
480+ ctx := context .Background ()
481+ err = h .Execute (& ctx )
475482 if err != nil {
476483 t .Fatalf ("healthcheck error :\n %v" , err )
477484 }
@@ -547,7 +554,8 @@ func TestHTTPExecuteQueryParam(t *testing.T) {
547554 if err != nil {
548555 t .Fatalf ("Initialization error :\n %v" , err )
549556 }
550- err = h .Execute (context .Background ())
557+ ctx := context .Background ()
558+ err = h .Execute (& ctx )
551559 if err != nil {
552560 t .Fatalf ("healthcheck error :\n %v" , err )
553561 }
0 commit comments