File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,14 @@ var _ = Describe("Webhook Server", func() {
37
37
testHostPort string
38
38
client * http.Client
39
39
server * webhook.Server
40
+ servingOpts envtest.WebhookInstallOptions
40
41
)
41
42
42
43
BeforeEach (func () {
43
44
ctx , ctxCancel = context .WithCancel (context .Background ())
44
45
// closed in indivual tests differently
45
46
46
- servingOpts : = envtest.WebhookInstallOptions {}
47
+ servingOpts = envtest.WebhookInstallOptions {}
47
48
Expect (servingOpts .PrepWithoutInstalling ()).To (Succeed ())
48
49
49
50
testHostPort = net .JoinHostPort (servingOpts .LocalServingHost , fmt .Sprintf ("%d" , servingOpts .LocalServingPort ))
@@ -62,8 +63,9 @@ var _ = Describe("Webhook Server", func() {
62
63
Port : servingOpts .LocalServingPort ,
63
64
CertDir : servingOpts .LocalServingCertDir ,
64
65
}
65
-
66
- // TODO(directxman12): cleanup generated certificate dir, etc
66
+ })
67
+ AfterEach (func () {
68
+ Expect (servingOpts .Cleanup ()).To (Succeed ())
67
69
})
68
70
69
71
startServer := func () (done <- chan struct {}) {
You can’t perform that action at this time.
0 commit comments