@@ -125,7 +125,7 @@ func runTests(admissionReviewVersion string) {
125
125
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
126
126
req .Header .Add ("Content-Type" , "application/json" )
127
127
w := httptest .NewRecorder ()
128
- svr .WebhookMux .ServeHTTP (w , req )
128
+ svr .WebhookMux () .ServeHTTP (w , req )
129
129
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
130
130
By ("sanity checking the response contains reasonable fields" )
131
131
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -139,7 +139,7 @@ func runTests(admissionReviewVersion string) {
139
139
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
140
140
req .Header .Add ("Content-Type" , "application/json" )
141
141
w = httptest .NewRecorder ()
142
- svr .WebhookMux .ServeHTTP (w , req )
142
+ svr .WebhookMux () .ServeHTTP (w , req )
143
143
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
144
144
})
145
145
@@ -199,7 +199,7 @@ func runTests(admissionReviewVersion string) {
199
199
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
200
200
req .Header .Add ("Content-Type" , "application/json" )
201
201
w := httptest .NewRecorder ()
202
- svr .WebhookMux .ServeHTTP (w , req )
202
+ svr .WebhookMux () .ServeHTTP (w , req )
203
203
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
204
204
By ("sanity checking the response contains reasonable fields" )
205
205
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -266,7 +266,7 @@ func runTests(admissionReviewVersion string) {
266
266
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
267
267
req .Header .Add ("Content-Type" , "application/json" )
268
268
w := httptest .NewRecorder ()
269
- svr .WebhookMux .ServeHTTP (w , req )
269
+ svr .WebhookMux () .ServeHTTP (w , req )
270
270
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
271
271
By ("sanity checking the response contains reasonable fields" )
272
272
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -281,7 +281,7 @@ func runTests(admissionReviewVersion string) {
281
281
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
282
282
req .Header .Add ("Content-Type" , "application/json" )
283
283
w = httptest .NewRecorder ()
284
- svr .WebhookMux .ServeHTTP (w , req )
284
+ svr .WebhookMux () .ServeHTTP (w , req )
285
285
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
286
286
})
287
287
@@ -341,7 +341,7 @@ func runTests(admissionReviewVersion string) {
341
341
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
342
342
req .Header .Add ("Content-Type" , "application/json" )
343
343
w := httptest .NewRecorder ()
344
- svr .WebhookMux .ServeHTTP (w , req )
344
+ svr .WebhookMux () .ServeHTTP (w , req )
345
345
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
346
346
347
347
By ("sending a request to a validating webhook path" )
@@ -351,7 +351,7 @@ func runTests(admissionReviewVersion string) {
351
351
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
352
352
req .Header .Add ("Content-Type" , "application/json" )
353
353
w = httptest .NewRecorder ()
354
- svr .WebhookMux .ServeHTTP (w , req )
354
+ svr .WebhookMux () .ServeHTTP (w , req )
355
355
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
356
356
By ("sanity checking the response contains reasonable field" )
357
357
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -415,7 +415,7 @@ func runTests(admissionReviewVersion string) {
415
415
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
416
416
req .Header .Add ("Content-Type" , "application/json" )
417
417
w := httptest .NewRecorder ()
418
- svr .WebhookMux .ServeHTTP (w , req )
418
+ svr .WebhookMux () .ServeHTTP (w , req )
419
419
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
420
420
By ("sanity checking the response contains reasonable field" )
421
421
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -484,7 +484,7 @@ func runTests(admissionReviewVersion string) {
484
484
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
485
485
req .Header .Add ("Content-Type" , "application/json" )
486
486
w := httptest .NewRecorder ()
487
- svr .WebhookMux .ServeHTTP (w , req )
487
+ svr .WebhookMux () .ServeHTTP (w , req )
488
488
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusNotFound ))
489
489
490
490
By ("sending a request to a validating webhook path" )
@@ -494,7 +494,7 @@ func runTests(admissionReviewVersion string) {
494
494
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
495
495
req .Header .Add ("Content-Type" , "application/json" )
496
496
w = httptest .NewRecorder ()
497
- svr .WebhookMux .ServeHTTP (w , req )
497
+ svr .WebhookMux () .ServeHTTP (w , req )
498
498
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
499
499
By ("sanity checking the response contains reasonable field" )
500
500
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -556,7 +556,7 @@ func runTests(admissionReviewVersion string) {
556
556
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
557
557
req .Header .Add ("Content-Type" , "application/json" )
558
558
w := httptest .NewRecorder ()
559
- svr .WebhookMux .ServeHTTP (w , req )
559
+ svr .WebhookMux () .ServeHTTP (w , req )
560
560
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
561
561
By ("sanity checking the response contains reasonable field" )
562
562
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -570,7 +570,7 @@ func runTests(admissionReviewVersion string) {
570
570
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
571
571
req .Header .Add ("Content-Type" , "application/json" )
572
572
w = httptest .NewRecorder ()
573
- svr .WebhookMux .ServeHTTP (w , req )
573
+ svr .WebhookMux () .ServeHTTP (w , req )
574
574
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
575
575
By ("sanity checking the response contains reasonable field" )
576
576
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
@@ -632,7 +632,7 @@ func runTests(admissionReviewVersion string) {
632
632
req := httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
633
633
req .Header .Add ("Content-Type" , "application/json" )
634
634
w := httptest .NewRecorder ()
635
- svr .WebhookMux .ServeHTTP (w , req )
635
+ svr .WebhookMux () .ServeHTTP (w , req )
636
636
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
637
637
By ("sanity checking the response contains reasonable field" )
638
638
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":false` ))
@@ -666,7 +666,7 @@ func runTests(admissionReviewVersion string) {
666
666
req = httptest .NewRequest ("POST" , "http://svc-name.svc-ns.svc" + path , reader )
667
667
req .Header .Add ("Content-Type" , "application/json" )
668
668
w = httptest .NewRecorder ()
669
- svr .WebhookMux .ServeHTTP (w , req )
669
+ svr .WebhookMux () .ServeHTTP (w , req )
670
670
ExpectWithOffset (1 , w .Code ).To (Equal (http .StatusOK ))
671
671
By ("sanity checking the response contains reasonable field" )
672
672
ExpectWithOffset (1 , w .Body ).To (ContainSubstring (`"allowed":true` ))
0 commit comments