testinfra

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterTypeKcp    = ClusterType("kcp")
	ClusterTypeSkr    = ClusterType("skr")
	ClusterTypeGarden = ClusterType("garden")
)

Variables

This section is empty.

Functions

func ReportAfterSuite

func ReportAfterSuite(report ginkgo.Report)

func SetupPvController

func SetupPvController(reg skrruntime.SkrRegistry) error

Types

type ClusterDSL

type ClusterDSL interface {
	GivenSecretExists(name string, data map[string][]byte) error
	GivenNamespaceExists(name string) error

	GivenConditionIsSet(ctx context.Context, obj composed.ObjWithConditions, conditions ...metav1.Condition) error
	WhenConditionIsSet(ctx context.Context, obj composed.ObjWithConditions, conditions ...metav1.Condition) error
}

type ClusterEnv

type ClusterEnv interface {
	Namespace() string
	ObjKey(name string) types.NamespacedName
}

type ClusterInfo

type ClusterInfo interface {
	ClusterEnv
	ClusterDSL

	Scheme() *runtime.Scheme
	Client() ctrlclient.Client
	Cfg() *rest.Config
	EnsureCrds(ctx context.Context) error
}

type ClusterType

type ClusterType string

type Infra

type Infra interface {
	InfraEnv
	InfraDSL

	KCP() ClusterInfo
	SKR() ClusterInfo
	Garden() ClusterInfo

	Stop() error
}

func Start

func Start() (Infra, error)

type InfraDSL

type InfraDSL interface {
	GivenSkrIpRangeExists(ctx context.Context, ns, name, cidr string, id string, conditions ...metav1.Condition) error
	WhenSkrIpRangeIsCreated(ctx context.Context, ns, name, cidr string, id string, conditions ...metav1.Condition) error

	WhenKymaModuleStateUpdates(kymaName string, state util.KymaModuleState) error
	GivenGardenShootGcpExists(name string) error
	GivenScopeGcpExists(name string) error
}

type InfraEnv

type InfraEnv interface {
	KcpManager() manager.Manager
	Registry() skrruntime.SkrRegistry
	ActiveSkrCollection() skrruntime.ActiveSkrCollection
	AwsMock() awsmock.Server
	GcpMock() gcpmock.Server
	SkrKymaRef() klog.ObjectRef
	SkrRunner() skrruntime.SkrRunner

	StartKcpControllers(ctx context.Context)
	StartSkrControllers(ctx context.Context)
	Ctx() context.Context
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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