Merge pull request #103536 from mengjiao-liu/clean-master-term-test

Clean up the remaining master names in test/integration
This commit is contained in:
Kubernetes Prow Robot 2021-07-08 03:05:05 -07:00 committed by GitHub
commit 1edf50192e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -551,7 +551,7 @@ func TestMultiAPIServerNodePortAllocation(t *testing.T) {
// create 2 api servers and 2 clients
for i := 0; i < 2; i++ {
// start master count api server
// start count api server
t.Logf("starting api server: %d", i)
server := kubeapiservertesting.StartTestServerOrDie(t, instanceOptions, []string{
"--advertise-address", fmt.Sprintf("10.0.1.%v", i+1),

View File

@ -62,7 +62,7 @@ AwEHoUQDQgAEH6cuzP8XuD5wal6wf9M6xDljTOPLX2i8uIp/C/ASqiIGUeeKQtX0
-----END EC PRIVATE KEY-----`
// StartRealAPIServerOrDie starts an API server that is appropriate for use in tests that require one of every resource
func StartRealAPIServerOrDie(t *testing.T, configFuncs ...func(*options.ServerRunOptions)) *Master {
func StartRealAPIServerOrDie(t *testing.T, configFuncs ...func(*options.ServerRunOptions)) *APIServer {
certDir, err := ioutil.TempDir("", t.Name())
if err != nil {
t.Fatal(err)
@ -125,7 +125,7 @@ func StartRealAPIServerOrDie(t *testing.T, configFuncs ...func(*options.ServerRu
}
// then build and use an etcd lock
// this prevents more than one of these masters from running at the same time
// this prevents more than one of these api servers from running at the same time
lock := concurrency.NewLocker(session, "kube_integration_etcd_raw")
lock.Lock()
@ -217,7 +217,7 @@ func StartRealAPIServerOrDie(t *testing.T, configFuncs ...func(*options.ServerRu
}
}
return &Master{
return &APIServer{
Client: kubeClient,
Dynamic: dynamic.NewForConfigOrDie(kubeClientConfig),
Config: kubeClientConfig,
@ -228,9 +228,9 @@ func StartRealAPIServerOrDie(t *testing.T, configFuncs ...func(*options.ServerRu
}
}
// Master represents a running API server that is ready for use
// APIServer represents a running API server that is ready for use
// The Cleanup func must be deferred to prevent resource leaks
type Master struct {
type APIServer struct {
Client clientset.Interface
Dynamic dynamic.Interface
Config *restclient.Config