framework

package
v1.12.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 60 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTestingNamespace added in v1.4.1

func CreateTestingNamespace(baseName string, apiserver *httptest.Server, t *testing.T) *v1.Namespace

func DeleteTestingNamespace added in v1.4.1

func DeleteTestingNamespace(ns *v1.Namespace, apiserver *httptest.Server, t *testing.T)

func EtcdMain added in v1.8.0

func EtcdMain(tests func() int)

func GetEtcdURL added in v1.8.0

func GetEtcdURL() string

return the EtcdURL

func NewIntegrationTestMasterConfig added in v1.2.0

func NewIntegrationTestMasterConfig() *master.Config

Returns the master config appropriate for most integration tests.

func NewIntegrationTestNodePreparer added in v1.5.0

func NewIntegrationTestNodePreparer(client clientset.Interface, countToStrategy []testutils.CountToStrategy, nodeNamePrefix string) testutils.TestNodePreparer

func NewMasterConfig added in v1.2.0

func NewMasterConfig() *master.Config

Returns a basic master config.

func NewSingleContentTypeSerializer added in v1.3.0

func NewSingleContentTypeSerializer(scheme *runtime.Scheme, info runtime.SerializerInfo) runtime.StorageSerializer

NewSingleContentTypeSerializer wraps a serializer in a NegotiatedSerializer that handles one content type

func SharedEtcd added in v1.9.0

func SharedEtcd() *storagebackend.Config

SharedEtcd creates a storage config for a shared etcd instance, with a unique prefix.

func StartTestServer added in v1.11.8

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 added in v1.7.0

type CloseFunc func()

CloseFunc can be called to cleanup the master

func RunAMaster

func RunAMaster(masterConfig *master.Config) (*master.Master, *httptest.Server, CloseFunc)

func RunAMasterUsingServer added in v1.5.0

func RunAMasterUsingServer(masterConfig *master.Config, s *httptest.Server, masterReceiver MasterReceiver) (*master.Master, *httptest.Server, CloseFunc)

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 added in v1.5.0

type IntegrationTestNodePreparer struct {
	// contains filtered or unexported fields
}

func (*IntegrationTestNodePreparer) CleanupNodes added in v1.5.0

func (p *IntegrationTestNodePreparer) CleanupNodes() error

func (*IntegrationTestNodePreparer) PrepareNodes added in v1.5.0

func (p *IntegrationTestNodePreparer) PrepareNodes() error

type MasterHolder added in v1.5.0

type MasterHolder struct {
	Initialized chan struct{}
	M           *master.Master
}

MasterHolder implements

func (*MasterHolder) SetMaster added in v1.5.0

func (h *MasterHolder) SetMaster(m *master.Master)

type MasterReceiver added in v1.5.0

type MasterReceiver interface {
	SetMaster(m *master.Master)
}

MasterReceiver can be used to provide the master to a custom incoming server function

type TestServerSetup added in v1.11.8

type TestServerSetup struct {
	ModifyServerRunOptions func(*options.ServerRunOptions)
	ModifyServerConfig     func(*master.Config)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL