Part of master to controlplane in test/integration(1.22)

This commit is contained in:
Mengjiao Liu
2021-05-25 11:16:07 +08:00
parent 2bbc0e3c54
commit 77b5ad2fb0
7 changed files with 33 additions and 33 deletions

View File

@@ -56,7 +56,7 @@ type ShutdownFunc func()
// StartApiserver starts a local API server for testing and returns the handle to the URL and the shutdown function to stop it.
func StartApiserver() (string, ShutdownFunc) {
h := &framework.MasterHolder{Initialized: make(chan struct{})}
h := &framework.APIServerHolder{Initialized: make(chan struct{})}
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
<-h.Initialized
h.M.GenericAPIServer.Handler.ServeHTTP(w, req)
@@ -329,8 +329,8 @@ func InitTestMaster(t *testing.T, nsPrefix string, admission admission.Interface
CancelFn: cancelFunc,
}
// 1. Create master
h := &framework.MasterHolder{Initialized: make(chan struct{})}
// 1. Create control plane
h := &framework.APIServerHolder{Initialized: make(chan struct{})}
s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
<-h.Initialized
h.M.GenericAPIServer.Handler.ServeHTTP(w, req)