support

package
v0.0.0-...-395ea23 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const OutputDirEnv = "OUTPUT_DIR"

Variables

View Source
var (
	TimeoutShort  = 1 * time.Minute
	TimeoutMedium = 2 * time.Minute
	TimeoutLong   = 5 * time.Minute
)
View Source
var ApplyOptions = metav1.ApplyOptions{FieldManager: "test", Force: true}

Functions

func ConditionStatus

func ConditionStatus[T conditionType](conditionType T) func(any) corev1.ConditionStatus

TODO: to be replaced with a generic version once common struct fields of a type set can be used. See https://github.com/golang/go/issues/48522

func Jobs

func Jobs(t Test, ns *corev1.Namespace, options ...Option[*metav1.ListOptions]) func(g gomega.Gomega) []batchv1.Job

func Node

func Node(t Test, name string) func(g gomega.Gomega) *corev1.Node

Types

type Client

type Client interface {
	Core() kubernetes.Interface
	Dynamic() dynamic.Interface
	Kueue() kueue.Interface
	GetConfig() *rest.Config
}

type Option

type Option[T any] interface {
	// contains filtered or unexported methods
}

func LabelSelector

func LabelSelector(selector string) Option[*metav1.ListOptions]

type T

type T struct {
	*gomega.WithT
	// contains filtered or unexported fields
}

func (*T) Client

func (t *T) Client() Client

func (*T) Ctx

func (t *T) Ctx() context.Context

func (*T) NewTestNamespace

func (t *T) NewTestNamespace(options ...Option[*corev1.Namespace]) *corev1.Namespace

func (*T) OutputDir

func (t *T) OutputDir() string

func (*T) T

func (t *T) T() *testing.T

type Test

type Test interface {
	T() *testing.T
	Ctx() context.Context
	Client() Client
	OutputDir() string

	gomega.Gomega

	NewTestNamespace(...Option[*corev1.Namespace]) *corev1.Namespace
}

func With

func With(t *testing.T) Test

func WithConfig

func WithConfig(t *testing.T, cfg *rest.Config) Test

Jump to

Keyboard shortcuts

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