mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 04:52:08 +00:00
add close server missing from serviceaccount test
This commit is contained in:
parent
e08fe4400e
commit
7ab462b639
@ -30,7 +30,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||||
"k8s.io/apimachinery/pkg/api/errors"
|
"k8s.io/apimachinery/pkg/api/errors"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@ -446,12 +446,13 @@ func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclie
|
|||||||
masterConfig.GenericConfig.Authentication.Authenticator = authenticator
|
masterConfig.GenericConfig.Authentication.Authenticator = authenticator
|
||||||
masterConfig.GenericConfig.Authorization.Authorizer = authorizer
|
masterConfig.GenericConfig.Authorization.Authorizer = authorizer
|
||||||
masterConfig.GenericConfig.AdmissionControl = serviceAccountAdmission
|
masterConfig.GenericConfig.AdmissionControl = serviceAccountAdmission
|
||||||
framework.RunAMasterUsingServer(masterConfig, apiServer, h)
|
_, _, kubeAPIServerCloseFn := framework.RunAMasterUsingServer(masterConfig, apiServer, h)
|
||||||
|
|
||||||
// Start the service account and service account token controllers
|
// Start the service account and service account token controllers
|
||||||
stopCh := make(chan struct{})
|
stopCh := make(chan struct{})
|
||||||
stop := func() {
|
stop := func() {
|
||||||
close(stopCh)
|
close(stopCh)
|
||||||
|
kubeAPIServerCloseFn()
|
||||||
apiServer.Close()
|
apiServer.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user