test

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestSetup

func TestSetup(t *testing.T) context.Context

Types

type ControllerTest

type ControllerTest func(*testing.T, context.Context, *framework.Framework, string)

type MultiClusterTestEnv

type MultiClusterTestEnv struct {
	// Clients is a mapping of cluster (or k8s context) names to Client objects. Note that
	// these are no-cache clients  as they are intended for use by the tests.
	Clients map[string]client.Client
	// contains filtered or unexported fields
}

func (*MultiClusterTestEnv) ControllerTest

func (e *MultiClusterTestEnv) ControllerTest(ctx context.Context, test ControllerTest) func(*testing.T)

func (*MultiClusterTestEnv) Start

func (e *MultiClusterTestEnv) Start(ctx context.Context, t *testing.T, initReconcilers func(mgr manager.Manager, clientCache *clientcache.ClientCache, clusters []cluster.Cluster) error) error

func (*MultiClusterTestEnv) Stop

func (e *MultiClusterTestEnv) Stop(t *testing.T)

type TestEnv

type TestEnv struct {
	*envtest.Environment

	TestClient client.Client
}

func (*TestEnv) Start

func (e *TestEnv) Start(ctx context.Context, t *testing.T, initReconcilers func(mgr manager.Manager) error) error

func (*TestEnv) Stop

func (e *TestEnv) Stop(t *testing.T)

Jump to

Keyboard shortcuts

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