tester

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package tester contains the logic to access the test context and the cluster included

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterContext

type ClusterContext struct {
	Config             *rest.Config
	NativeClient       *kubernetes.Clientset
	ControllerClient   client.Client
	Cluster            liqov1beta1.ClusterID
	KubeconfigPath     string
	HomeCluster        bool
	Role               liqov1beta1.RoleType
	NumPeeredConsumers int
	NumPeeredProviders int
}

ClusterContext encapsulate all information and objects used to access a test cluster.

func GetConsumers

func GetConsumers(clusters []ClusterContext) []ClusterContext

GetConsumers returns a slice of clusters having role Consumer.

func GetProviders

func GetProviders(clusters []ClusterContext) []ClusterContext

GetProviders returns a slice of clusters having role Provider.

type Tester

type Tester struct {
	Clusters  []ClusterContext
	Namespace string
	// ClustersNumber represents the number of available clusters
	ClustersNumber   int
	OverlappingCIDRs bool
	LiqoctlPath      string
	Cni              string
	Infrastructure   string
}

Tester is used to encapsulate the context where the test is executed.

func GetTester

func GetTester(ctx context.Context) *Tester

GetTester returns a Tester instance.

func GetTesterUninstall added in v0.3.1

func GetTesterUninstall(ctx context.Context) *Tester

GetTesterUninstall returns a Tester instance that do not interact with liqo resources.

Jump to

Keyboard shortcuts

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