kubernetesk8s.io/kubernetes/test/integration/framework Index | Files

package framework

import "k8s.io/kubernetes/test/integration/framework"

Index

Functions

func CreateTestingNamespace

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

func DeleteTestingNamespace

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

func EtcdMain

func EtcdMain(tests func() int)

func GetEtcdURL

func GetEtcdURL() string

return the EtcdURL

func GetPauseImageName

func GetPauseImageName(c clientset.Interface) string

GetPauseImageName fetches the pause image name for the same architecture as the apiserver.

func GetServerArchitecture

func GetServerArchitecture(c clientset.Interface) string

GetServerArchitecture fetches the architecture of the cluster's apiserver.

func NewIntegrationTestMasterConfig

func NewIntegrationTestMasterConfig() *master.Config

Returns the master config appropriate for most integration tests.

func NewIntegrationTestNodePreparer

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

func NewMasterConfig

func NewMasterConfig() *master.Config

Returns a basic master config.

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.

Types

type CloseFunc

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

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

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

func (*IntegrationTestNodePreparer) CleanupNodes

func (p *IntegrationTestNodePreparer) CleanupNodes() error

func (*IntegrationTestNodePreparer) PrepareNodes

func (p *IntegrationTestNodePreparer) PrepareNodes() error

type MasterHolder

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

MasterHolder implements

func (*MasterHolder) SetMaster

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

type MasterReceiver

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

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

Source Files

etcd.go master_utils.go perf_utils.go serializer.go util.go

Version
v1.10.8-beta.0
Published
Aug 20, 2018
Platform
js/wasm
Imports
58 packages
Last checked
6 minutes ago

Tools for package owners.