Documentation ¶
Index ¶
- func CreateKubeconfigFileForRestConfig(restConfig *rest.Config) (clientcmdapi.Config, error)
- func RootDir() string
- func Run(m *testing.M, setupFunc func(e *Environment)) (code int)
- func RunMulti(m *testing.M, setupFunc func(e *MultiK8sEnvironment), numClusters int) (code int)
- func RunMultiKind(setupFunc func(e *MultiK8sEnvironment), topology []int, testDir string) (deferFunc func())
- type Environment
- func (e *Environment) CreateNamespace(t *testing.T) string
- func (e *Environment) GetClientInNamespace(namespace string) client.Client
- func (e *Environment) GetKubeconfig() ([]byte, error)
- func (e *Environment) RawClient() client.Client
- func (e *Environment) RestConfig() *rest.Config
- func (e *Environment) Start()
- func (e *Environment) Stop()
- type KindManager
- type MultiK8sEnvironment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKubeconfigFileForRestConfig ¶ added in v0.4.0
func CreateKubeconfigFileForRestConfig(restConfig *rest.Config) (clientcmdapi.Config, error)
func RunMulti ¶ added in v0.4.0
func RunMulti(m *testing.M, setupFunc func(e *MultiK8sEnvironment), numClusters int) (code int)
func RunMultiKind ¶ added in v0.5.0
func RunMultiKind(setupFunc func(e *MultiK8sEnvironment), topology []int, testDir string) (deferFunc func())
Types ¶
type Environment ¶
type Environment struct { Context context.Context Kubeconfig string KindCluster KindManager // contains filtered or unexported fields }
func NewEnvironment ¶
func NewEnvironment(ctx context.Context) *Environment
func NewKindEnvironment ¶ added in v0.5.0
func NewKindEnvironment(ctx context.Context, cluster KindManager) *Environment
func (*Environment) CreateNamespace ¶
func (e *Environment) CreateNamespace(t *testing.T) string
func (*Environment) GetClientInNamespace ¶ added in v0.4.0
func (e *Environment) GetClientInNamespace(namespace string) client.Client
func (*Environment) GetKubeconfig ¶ added in v0.4.0
func (e *Environment) GetKubeconfig() ([]byte, error)
func (*Environment) RawClient ¶ added in v0.4.0
func (e *Environment) RawClient() client.Client
func (*Environment) RestConfig ¶ added in v0.3.0
func (e *Environment) RestConfig() *rest.Config
func (*Environment) Start ¶ added in v0.4.0
func (e *Environment) Start()
func (*Environment) Stop ¶ added in v0.4.0
func (e *Environment) Stop()
type KindManager ¶ added in v0.5.0
type KindManager struct { ClusterName string Nodes int KubeconfigLocation *os.File RestConfig *rest.Config // contains filtered or unexported fields }
func (*KindManager) CreateKindCluster ¶ added in v0.5.0
func (k *KindManager) CreateKindCluster() error
func (*KindManager) GetClient ¶ added in v0.5.0
func (k *KindManager) GetClient() (*client.Client, error)
func (*KindManager) TearDownKindCluster ¶ added in v0.5.0
func (k *KindManager) TearDownKindCluster() error
type MultiK8sEnvironment ¶ added in v0.4.0
type MultiK8sEnvironment []*Environment
Click to show internal directories.
Click to hide internal directories.