tests

package
v0.0.0-...-4322bf5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const FakeJWTSecretName = "fake-jwt-secret"
View Source
const FakeNamespace = "fake"

Variables

This section is empty.

Functions

func CreateObjects

func CreateObjects(t *testing.T, k8s kubernetes.Interface, arango arangoClientSet.Interface, objects ...interface{}) func(t *testing.T)

func DeleteObjects

func DeleteObjects(t *testing.T, k8s kubernetes.Interface, arango arangoClientSet.Interface, objects ...interface{})

func DurationBetween

func DurationBetween() func(t *testing.T, expected time.Duration, skew float64)

func GetContainerByNameT

func GetContainerByNameT(t *testing.T, containers []core.Container, name string) core.Container

func Handle

func Handle(handler operator.Handler, item operation.Item) error

func HandleFunc

func HandleFunc(in func(ctx context.Context) (bool, error)) error

func HandleWithMax

func HandleWithMax(handler operator.Handler, item operation.Item, max int) error

func Interrupt

func Interrupt() error

func IsNamespaced

func IsNamespaced(in meta.Object) bool

func NewEmptyInspector

func NewEmptyInspector(t *testing.T) inspectorInterface.Inspector

func NewItem

func NewItem(t *testing.T, o operation.Operation, object meta.Object) operation.Item

func NewMetaObject

func NewMetaObject[T meta.Object](t *testing.T, namespace, name string, mods ...MetaObjectMod[T]) T

func NewMetaObjectInDefaultNamespace

func NewMetaObjectInDefaultNamespace[T meta.Object](t *testing.T, name string, mods ...MetaObjectMod[T]) T

func RefreshObjects

func RefreshObjects(t *testing.T, k8s kubernetes.Interface, arango arangoClientSet.Interface, objects ...interface{})

func RefreshObjectsC

func RefreshObjectsC(t *testing.T, client kclient.Client, objects ...interface{})

func SetMetaBasedOnType

func SetMetaBasedOnType(t *testing.T, object meta.Object)

func UpdateObjects

func UpdateObjects(t *testing.T, k8s kubernetes.Interface, arango arangoClientSet.Interface, objects ...interface{}) func(t *testing.T)

func UpdateObjectsC

func UpdateObjectsC(t *testing.T, client kclient.Client, objects ...interface{}) func(t *testing.T)

func WithLogScanner

func WithLogScanner(t *testing.T, name string, in func(t *testing.T, s LogScanner))

Types

type KubernetesObject

type KubernetesObject interface {
	meta.Object
	meta.Type
}

type LogScanner

type LogScanner interface {
	Factory() logging.Factory

	Get(timeout time.Duration) (string, bool)
	GetData(t *testing.T, timeout time.Duration, obj interface{}) bool
}

type MetaObjectMod

type MetaObjectMod[T meta.Object] func(t *testing.T, obj T)

type Timeout

type Timeout func() error

func NewTimeout

func NewTimeout(in Timeout) Timeout

func (Timeout) WithTimeout

func (t Timeout) WithTimeout(timeout, interval time.Duration) error

func (Timeout) WithTimeoutT

func (t Timeout) WithTimeoutT(z *testing.T, timeout, interval time.Duration)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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