Merge pull request #109338 from kerthcet/cleanup/forget-to-close-when-error

test/integration/framework: call closeFn() in startAPIServerOrDie() on error
This commit is contained in:
Kubernetes Prow Robot 2022-05-03 19:31:22 -07:00 committed by GitHub
commit edac6fce2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,6 +233,7 @@ func startAPIServerOrDie(controlPlaneConfig *controlplane.Config, incomingServer
clientset, err := clientset.NewForConfig(controlPlaneConfig.GenericConfig.LoopbackClientConfig)
if err != nil {
closeFn()
klog.Fatal(err)
}