@@ -125,7 +125,7 @@ func runTests(admissionReviewVersion string) {
125125 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
126126 req .Header .Add ("Content-Type" , "application/json" )
127127 w := httptest .NewRecorder ()
128- svr .WebhookMux .ServeHTTP (w , req )
128+ svr .WebhookMux () .ServeHTTP (w , req )
129129 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
130130 By ("sanity checking the response contains reasonable fields" )
131131 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -139,7 +139,7 @@ func runTests(admissionReviewVersion string) {
139139 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
140140 req .Header .Add ("Content-Type" , "application/json" )
141141 w = httptest .NewRecorder ()
142- svr .WebhookMux .ServeHTTP (w , req )
142+ svr .WebhookMux () .ServeHTTP (w , req )
143143 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
144144 })
145145
@@ -199,7 +199,7 @@ func runTests(admissionReviewVersion string) {
199199 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
200200 req .Header .Add ("Content-Type" , "application/json" )
201201 w := httptest .NewRecorder ()
202- svr .WebhookMux .ServeHTTP (w , req )
202+ svr .WebhookMux () .ServeHTTP (w , req )
203203 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
204204 By ("sanity checking the response contains reasonable fields" )
205205 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -266,7 +266,7 @@ func runTests(admissionReviewVersion string) {
266266 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
267267 req .Header .Add ("Content-Type" , "application/json" )
268268 w := httptest .NewRecorder ()
269- svr .WebhookMux .ServeHTTP (w , req )
269+ svr .WebhookMux () .ServeHTTP (w , req )
270270 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
271271 By ("sanity checking the response contains reasonable fields" )
272272 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -281,7 +281,7 @@ func runTests(admissionReviewVersion string) {
281281 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
282282 req .Header .Add ("Content-Type" , "application/json" )
283283 w = httptest .NewRecorder ()
284- svr .WebhookMux .ServeHTTP (w , req )
284+ svr .WebhookMux () .ServeHTTP (w , req )
285285 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
286286 })
287287
@@ -341,7 +341,7 @@ func runTests(admissionReviewVersion string) {
341341 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
342342 req .Header .Add ("Content-Type" , "application/json" )
343343 w := httptest .NewRecorder ()
344- svr .WebhookMux .ServeHTTP (w , req )
344+ svr .WebhookMux () .ServeHTTP (w , req )
345345 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
346346
347347 By ("sending a request to a validating webhook path" )
@@ -351,7 +351,7 @@ func runTests(admissionReviewVersion string) {
351351 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
352352 req .Header .Add ("Content-Type" , "application/json" )
353353 w = httptest .NewRecorder ()
354- svr .WebhookMux .ServeHTTP (w , req )
354+ svr .WebhookMux () .ServeHTTP (w , req )
355355 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
356356 By ("sanity checking the response contains reasonable field" )
357357 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -415,7 +415,7 @@ func runTests(admissionReviewVersion string) {
415415 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
416416 req .Header .Add ("Content-Type" , "application/json" )
417417 w := httptest .NewRecorder ()
418- svr .WebhookMux .ServeHTTP (w , req )
418+ svr .WebhookMux () .ServeHTTP (w , req )
419419 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
420420 By ("sanity checking the response contains reasonable field" )
421421 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -484,7 +484,7 @@ func runTests(admissionReviewVersion string) {
484484 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
485485 req .Header .Add ("Content-Type" , "application/json" )
486486 w := httptest .NewRecorder ()
487- svr .WebhookMux .ServeHTTP (w , req )
487+ svr .WebhookMux () .ServeHTTP (w , req )
488488 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
489489
490490 By ("sending a request to a validating webhook path" )
@@ -494,7 +494,7 @@ func runTests(admissionReviewVersion string) {
494494 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
495495 req .Header .Add ("Content-Type" , "application/json" )
496496 w = httptest .NewRecorder ()
497- svr .WebhookMux .ServeHTTP (w , req )
497+ svr .WebhookMux () .ServeHTTP (w , req )
498498 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
499499 By ("sanity checking the response contains reasonable field" )
500500 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -556,7 +556,7 @@ func runTests(admissionReviewVersion string) {
556556 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
557557 req .Header .Add ("Content-Type" , "application/json" )
558558 w := httptest .NewRecorder ()
559- svr .WebhookMux .ServeHTTP (w , req )
559+ svr .WebhookMux () .ServeHTTP (w , req )
560560 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
561561 By ("sanity checking the response contains reasonable field" )
562562 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -570,7 +570,7 @@ func runTests(admissionReviewVersion string) {
570570 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
571571 req .Header .Add ("Content-Type" , "application/json" )
572572 w = httptest .NewRecorder ()
573- svr .WebhookMux .ServeHTTP (w , req )
573+ svr .WebhookMux () .ServeHTTP (w , req )
574574 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
575575 By ("sanity checking the response contains reasonable field" )
576576 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -632,7 +632,7 @@ func runTests(admissionReviewVersion string) {
632632 req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
633633 req .Header .Add ("Content-Type" , "application/json" )
634634 w := httptest .NewRecorder ()
635- svr .WebhookMux .ServeHTTP (w , req )
635+ svr .WebhookMux () .ServeHTTP (w , req )
636636 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
637637 By ("sanity checking the response contains reasonable field" )
638638 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -666,7 +666,7 @@ func runTests(admissionReviewVersion string) {
666666 req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
667667 req .Header .Add ("Content-Type" , "application/json" )
668668 w = httptest .NewRecorder ()
669- svr .WebhookMux .ServeHTTP (w , req )
669+ svr .WebhookMux () .ServeHTTP (w , req )
670670 ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
671671 By ("sanity checking the response contains reasonable field" )
672672 ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
0 commit comments