Documentation ¶
Index ¶
- func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *testing.T) *v1.Namespace
- func DefaultEtcdOptions() *options.EtcdOptions
- func DefaultOpenAPIConfig() *openapicommon.Config
- func DeleteTestingNamespace(ns *v1.Namespace, apiserver *httptest.Server, t *testing.T)
- func EtcdMain(tests func() int)
- func GetEtcdURL() string
- func NewIntegrationTestMasterConfig() *master.Config
- func NewIntegrationTestMasterConfigWithOptions(opts *MasterConfigOptions) *master.Config
- func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy []testutils.CountToStrategy, ...) testutils.TestNodePreparer
- func NewMasterConfig() *master.Config
- func NewMasterConfigWithOptions(opts *MasterConfigOptions) *master.Config
- func NewSingleContentTypeSerializer(scheme *runtime.Scheme, info runtime.SerializerInfo) runtime.StorageSerializer
- func SharedEtcd() *storagebackend.Config
- func StartTestServer(t *testing.T, stopCh <-chan struct{}, setup TestServerSetup) (client.Interface, *rest.Config)
- type CloseFunc
- type Config
- type IntegrationTestNodePreparer
- type MasterConfigOptions
- type MasterHolder
- type MasterReceiver
- type TestServerSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestingNamespace ¶
func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *testing.T) *v1.Namespace
CreateTestingNamespace creates a namespace for testing.
func DefaultEtcdOptions ¶
func DefaultEtcdOptions() *options.EtcdOptions
DefaultEtcdOptions are the default EtcdOptions for use with integration tests.
func DefaultOpenAPIConfig ¶
func DefaultOpenAPIConfig() *openapicommon.Config
DefaultOpenAPIConfig returns an openapicommon.Config initialized to default values.
func DeleteTestingNamespace ¶
DeleteTestingNamespace is currently a no-op function.
func EtcdMain ¶
func EtcdMain(tests func() int)
EtcdMain starts an etcd instance before running tests.
func GetEtcdURL ¶
func GetEtcdURL() string
GetEtcdURL returns the URL of the etcd instance started by EtcdMain.
func NewIntegrationTestMasterConfig ¶
NewIntegrationTestMasterConfig returns the master config appropriate for most integration tests.
func NewIntegrationTestMasterConfigWithOptions ¶
func NewIntegrationTestMasterConfigWithOptions(opts *MasterConfigOptions) *master.Config
NewIntegrationTestMasterConfigWithOptions returns the master config appropriate for most integration tests configured with the provided options.
func NewIntegrationTestNodePreparer ¶
func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy []testutils.CountToStrategy, nodeNamePrefix string) testutils.TestNodePreparer
NewIntegrationTestNodePreparer creates an IntegrationTestNodePreparer configured with defaults.
func NewMasterConfig ¶
NewMasterConfig returns a basic master config.
func NewMasterConfigWithOptions ¶
func NewMasterConfigWithOptions(opts *MasterConfigOptions) *master.Config
NewMasterConfigWithOptions returns a basic master config configured with the provided options.
func NewSingleContentTypeSerializer ¶
func NewSingleContentTypeSerializer(scheme *runtime.Scheme, info runtime.SerializerInfo) runtime.StorageSerializer
NewSingleContentTypeSerializer wraps a serializer in a NegotiatedSerializer that handles one content type
func SharedEtcd ¶
func SharedEtcd() *storagebackend.Config
SharedEtcd creates a storage config for a shared etcd instance, with a unique prefix.
func StartTestServer ¶
func StartTestServer(t *testing.T, stopCh <-chan struct{}, setup TestServerSetup) (client.Interface, *rest.Config)
StartTestServer runs a kube-apiserver, optionally calling out to the setup.ModifyServerRunOptions and setup.ModifyServerConfig functions
Types ¶
type CloseFunc ¶
type CloseFunc func()
CloseFunc can be called to cleanup the master
func RunAMaster ¶
RunAMaster starts a master with the provided config.
type Config ¶
type Config struct { // If nil, a default is used, partially filled configs will not get populated. MasterConfig *master.Config StartReplicationManager bool // Client throttling qps QPS float32 // Client burst qps, also burst replicas allowed in rc manager Burst int }
Config is a struct of configuration directives for NewMasterComponents.
type IntegrationTestNodePreparer ¶
type IntegrationTestNodePreparer struct {
// contains filtered or unexported fields
}
IntegrationTestNodePreparer holds configuration information for the test node preparer.
func (*IntegrationTestNodePreparer) CleanupNodes ¶
func (p *IntegrationTestNodePreparer) CleanupNodes() error
CleanupNodes deletes existing test nodes.
func (*IntegrationTestNodePreparer) PrepareNodes ¶
func (p *IntegrationTestNodePreparer) PrepareNodes() error
PrepareNodes prepares countToStrategy test nodes.
type MasterConfigOptions ¶
type MasterConfigOptions struct {
EtcdOptions *options.EtcdOptions
}
MasterConfigOptions are the configurable options for a new integration test master config.
type MasterHolder ¶
MasterHolder implements
func (*MasterHolder) SetMaster ¶
func (h *MasterHolder) SetMaster(m *master.Master)
SetMaster assigns the current master.
type MasterReceiver ¶
MasterReceiver can be used to provide the master to a custom incoming server function
type TestServerSetup ¶
type TestServerSetup struct { ModifyServerRunOptions func(*options.ServerRunOptions) ModifyServerConfig func(*master.Config) }
TestServerSetup holds configuration information for a kube-apiserver test server.