Clean shutdown of test apiserver
This commit is contained in:
@@ -37,14 +37,11 @@ import (
|
||||
)
|
||||
|
||||
func TestWebhookLoopback(t *testing.T) {
|
||||
stopCh := make(chan struct{})
|
||||
defer close(stopCh)
|
||||
|
||||
webhookPath := "/webhook-test"
|
||||
|
||||
called := int32(0)
|
||||
|
||||
client, _ := framework.StartTestServer(t, stopCh, framework.TestServerSetup{
|
||||
client, _, tearDownFn := framework.StartTestServer(t, framework.TestServerSetup{
|
||||
ModifyServerRunOptions: func(opts *options.ServerRunOptions) {
|
||||
},
|
||||
ModifyServerConfig: func(config *controlplane.Config) {
|
||||
@@ -66,6 +63,7 @@ func TestWebhookLoopback(t *testing.T) {
|
||||
})
|
||||
},
|
||||
})
|
||||
defer tearDownFn()
|
||||
|
||||
fail := admissionregistrationv1.Fail
|
||||
noSideEffects := admissionregistrationv1.SideEffectClassNone
|
||||
|
Reference in New Issue
Block a user