Clean up the master term in test/integration comments
This commit is contained in:
parent
9d3e4eb862
commit
4eab19ae7d
@ -34,7 +34,7 @@ import (
|
|||||||
"k8s.io/kubernetes/test/integration/framework"
|
"k8s.io/kubernetes/test/integration/framework"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Inject into master an authorizer that uses user info.
|
// Inject into control plane an authorizer that uses user info.
|
||||||
// TODO(etune): remove this test once a more comprehensive built-in authorizer is implemented.
|
// TODO(etune): remove this test once a more comprehensive built-in authorizer is implemented.
|
||||||
type sarAuthorizer struct{}
|
type sarAuthorizer struct{}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
package auth
|
package auth
|
||||||
|
|
||||||
// This file tests authentication and (soon) authorization of HTTP requests to a master object.
|
// This file tests authentication and (soon) authorization of HTTP requests to an API server object.
|
||||||
// It does not use the client in pkg/client/... because authentication and authorization needs
|
// It does not use the client in pkg/client/... because authentication and authorization needs
|
||||||
// to work for any client of the HTTP interface.
|
// to work for any client of the HTTP interface.
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ func TestAuthModeAlwaysDeny(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inject into master an authorizer that uses user info.
|
// Inject into control plane an authorizer that uses user info.
|
||||||
// TODO(etune): remove this test once a more comprehensive built-in authorizer is implemented.
|
// TODO(etune): remove this test once a more comprehensive built-in authorizer is implemented.
|
||||||
type allowAliceAuthorizer struct{}
|
type allowAliceAuthorizer struct{}
|
||||||
|
|
||||||
@ -1203,7 +1203,7 @@ func TestReadOnlyAuthorization(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestWebhookTokenAuthenticator tests that a master can use the webhook token
|
// TestWebhookTokenAuthenticator tests that a control plane can use the webhook token
|
||||||
// authenticator to call out to a remote web server for authentication
|
// authenticator to call out to a remote web server for authentication
|
||||||
// decisions.
|
// decisions.
|
||||||
func TestWebhookTokenAuthenticator(t *testing.T) {
|
func TestWebhookTokenAuthenticator(t *testing.T) {
|
||||||
|
@ -101,7 +101,7 @@ func newDeployment(name, ns string, replicas int32) *apps.Deployment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// dcSetup sets up necessities for Deployment integration test, including master, apiserver, informers, and clientset
|
// dcSetup sets up necessities for Deployment integration test, including control plane, apiserver, informers, and clientset
|
||||||
func dcSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *replicaset.ReplicaSetController, *deployment.DeploymentController, informers.SharedInformerFactory, clientset.Interface) {
|
func dcSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *replicaset.ReplicaSetController, *deployment.DeploymentController, informers.SharedInformerFactory, clientset.Interface) {
|
||||||
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
||||||
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
|
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
|
||||||
@ -132,7 +132,7 @@ func dcSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *replicaset.R
|
|||||||
return s, closeFn, rm, dc, informers, clientSet
|
return s, closeFn, rm, dc, informers, clientSet
|
||||||
}
|
}
|
||||||
|
|
||||||
// dcSimpleSetup sets up necessities for Deployment integration test, including master, apiserver,
|
// dcSimpleSetup sets up necessities for Deployment integration test, including control plane, apiserver,
|
||||||
// and clientset, but not controllers and informers
|
// and clientset, but not controllers and informers
|
||||||
func dcSimpleSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, clientset.Interface) {
|
func dcSimpleSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, clientset.Interface) {
|
||||||
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
||||||
|
@ -709,7 +709,7 @@ func TestServiceAlloc(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TestUpdateNodeObjects represents a simple version of the behavior of node checkins at steady
|
// TestUpdateNodeObjects represents a simple version of the behavior of node checkins at steady
|
||||||
// state. This test allows for easy profiling of a realistic master scenario for baseline CPU
|
// state. This test allows for easy profiling of a realistic primary scenario for baseline CPU
|
||||||
// in very large clusters. It is disabled by default - start a kube-apiserver and pass
|
// in very large clusters. It is disabled by default - start a kube-apiserver and pass
|
||||||
// UPDATE_NODE_APISERVER as the host value.
|
// UPDATE_NODE_APISERVER as the host value.
|
||||||
func TestUpdateNodeObjects(t *testing.T) {
|
func TestUpdateNodeObjects(t *testing.T) {
|
||||||
|
@ -80,7 +80,7 @@ func initDisruptionController(t *testing.T, testCtx *testutils.TestContext) *dis
|
|||||||
return dc
|
return dc
|
||||||
}
|
}
|
||||||
|
|
||||||
// initTest initializes a test environment and creates master and scheduler with default
|
// initTest initializes a test environment and creates API server and scheduler with default
|
||||||
// configuration.
|
// configuration.
|
||||||
func initTest(t *testing.T, nsPrefix string, opts ...scheduler.Option) *testutils.TestContext {
|
func initTest(t *testing.T, nsPrefix string, opts ...scheduler.Option) *testutils.TestContext {
|
||||||
testCtx := testutils.InitTestSchedulerWithOptions(t, testutils.InitTestAPIServer(t, nsPrefix, nil), nil, opts...)
|
testCtx := testutils.InitTestSchedulerWithOptions(t, testutils.InitTestAPIServer(t, nsPrefix, nil), nil, opts...)
|
||||||
@ -89,7 +89,7 @@ func initTest(t *testing.T, nsPrefix string, opts ...scheduler.Option) *testutil
|
|||||||
return testCtx
|
return testCtx
|
||||||
}
|
}
|
||||||
|
|
||||||
// initTestDisablePreemption initializes a test environment and creates master and scheduler with default
|
// initTestDisablePreemption initializes a test environment and creates API server and scheduler with default
|
||||||
// configuration but with pod preemption disabled.
|
// configuration but with pod preemption disabled.
|
||||||
func initTestDisablePreemption(t *testing.T, nsPrefix string) *testutils.TestContext {
|
func initTestDisablePreemption(t *testing.T, nsPrefix string) *testutils.TestContext {
|
||||||
cfg := configtesting.V1beta2ToInternalWithDefaults(t, v1beta2.KubeSchedulerConfiguration{
|
cfg := configtesting.V1beta2ToInternalWithDefaults(t, v1beta2.KubeSchedulerConfiguration{
|
||||||
|
@ -67,7 +67,7 @@ func newDefaultComponentConfig() (*config.KubeSchedulerConfiguration, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// mustSetupScheduler starts the following components:
|
// mustSetupScheduler starts the following components:
|
||||||
// - k8s api server (a.k.a. master)
|
// - k8s api server
|
||||||
// - scheduler
|
// - scheduler
|
||||||
// It returns regular and dynamic clients, and destroyFunc which should be used to
|
// It returns regular and dynamic clients, and destroyFunc which should be used to
|
||||||
// remove resources after finished.
|
// remove resources after finished.
|
||||||
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
|
|
||||||
package serviceaccount
|
package serviceaccount
|
||||||
|
|
||||||
// This file tests authentication and (soon) authorization of HTTP requests to a master object.
|
// This file tests authentication and (soon) authorization of HTTP requests to an API server object.
|
||||||
// It does not use the client in pkg/client/... because authentication and authorization needs
|
// It does not use the client in pkg/client/... because authentication and authorization needs
|
||||||
// to work for any client of the HTTP interface.
|
// to work for any client of the HTTP interface.
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ func newStatefulSetPVC(name string) v1.PersistentVolumeClaim {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// scSetup sets up necessities for Statefulset integration test, including master, apiserver, informers, and clientset
|
// scSetup sets up necessities for Statefulset integration test, including control plane, apiserver, informers, and clientset
|
||||||
func scSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *statefulset.StatefulSetController, informers.SharedInformerFactory, clientset.Interface) {
|
func scSetup(t *testing.T) (*httptest.Server, framework.CloseFunc, *statefulset.StatefulSetController, informers.SharedInformerFactory, clientset.Interface) {
|
||||||
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
controlPlaneConfig := framework.NewIntegrationTestControlPlaneConfig()
|
||||||
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
|
_, s, closeFn := framework.RunAnAPIServer(controlPlaneConfig)
|
||||||
|
@ -41,7 +41,7 @@ func DeletePodOrErrorf(t *testing.T, c clientset.Interface, ns, name string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Requests to try. Each one should be forbidden or not forbidden
|
// Requests to try. Each one should be forbidden or not forbidden
|
||||||
// depending on the authentication and authorization setup of the master.
|
// depending on the authentication and authorization setup of the API server.
|
||||||
var (
|
var (
|
||||||
Code200 = map[int]bool{200: true}
|
Code200 = map[int]bool{200: true}
|
||||||
Code201 = map[int]bool{201: true}
|
Code201 = map[int]bool{201: true}
|
||||||
|
@ -54,7 +54,7 @@ type testContext struct {
|
|||||||
cancelFn context.CancelFunc
|
cancelFn context.CancelFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
// initTestAPIServer initializes a test environment and creates a master with default
|
// initTestAPIServer initializes a test environment and creates an API server with default
|
||||||
// configuration. Alpha resources are enabled automatically if the corresponding feature
|
// configuration. Alpha resources are enabled automatically if the corresponding feature
|
||||||
// is enabled.
|
// is enabled.
|
||||||
func initTestAPIServer(t *testing.T, nsPrefix string, admission admission.Interface) *testContext {
|
func initTestAPIServer(t *testing.T, nsPrefix string, admission admission.Interface) *testContext {
|
||||||
|
Loading…
Reference in New Issue
Block a user