fixture

package
v0.4.17-0rc0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OptionNone              = 0
	OptionRandomizeName     = 1 << iota
	OptionAvoidCooldown     = 2 << iota
	OptionStaticClusterData = 4 << iota
)

Variables

This section is empty.

Functions

func Cooldown

func Cooldown(ft *Fixture)

func GetDeviceType1Name

func GetDeviceType1Name() string

func GetDeviceType2Name

func GetDeviceType2Name() string

func GetDeviceType3Name

func GetDeviceType3Name() string

func ListNodeNames

func ListNodeNames(nodeNames sets.Set[string]) []string

func MustSettleNRT

func MustSettleNRT(fxt *Fixture)

func PickNodeIndex

func PickNodeIndex(nodes []corev1.Node) (int, bool)

func PopNodeName

func PopNodeName(nodeNames sets.Set[string]) (string, bool)

func RandomizeName

func RandomizeName(baseName string) string

func Skip

func Skip(ft *Fixture, message string)

func Skipf

func Skipf(ft *Fixture, format string, args ...interface{})

func Teardown

func Teardown(ft *Fixture) error

func WaitForPaddingPodsRunning

func WaitForPaddingPodsRunning(fxt *Fixture, paddingPods []*corev1.Pod) []string

WaitPodsRunning waits for all padding pods to be up and running ( or fail)

Types

type Fixture

type Fixture struct {
	// Client defines the API client to run CRUD operations, that will be used for testing
	Client client.Client
	// K8sClient defines k8s client to run subresource operations, for example you should use it to get pod logs
	K8sClient      *kubernetes.Clientset
	Namespace      corev1.Namespace
	InitialNRTList nrtv1alpha2.NodeResourceTopologyList
	Skipped        bool
	IsRebootTest   bool
	// contains filtered or unexported fields
}

func Setup

func Setup(baseName string, nrtList nrtv1alpha2.NodeResourceTopologyList) (*Fixture, error)

func SetupWithOptions

func SetupWithOptions(name string, nrtList nrtv1alpha2.NodeResourceTopologyList, options Options) (*Fixture, error)

func (*Fixture) DEnv

func (fxt *Fixture) DEnv() *deployer.Environment

func (*Fixture) DEnvWithContext

func (fxt *Fixture) DEnvWithContext(ctx context.Context) *deployer.Environment

type Options

type Options uint

Jump to

Keyboard shortcuts

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