fixture

package
v0.4.14-0rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptionNone          = 0
	OptionRandomizeName = 1 << iota
	OptionAvoidCooldown = 2 << 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 PickNodeIndex

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

func PopNodeName

func PopNodeName(nodeNames sets.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 WaitForNRTSettle

func WaitForNRTSettle(fxt *Fixture) (*nrtv1alpha2.NodeResourceTopologyList, 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
	// 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)

type Options

type Options uint

Jump to

Keyboard shortcuts

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