expectations

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCreateNames

func GenerateCreateNames(name string, ct int) []string

func ObjectKeysFromNames

func ObjectKeysFromNames(namespace string, names []string) []client.ObjectKey

func ObjectKeysFromObjectStructSlice

func ObjectKeysFromObjectStructSlice[O utilclient.Object[OStruct], S ~[]OStruct, OStruct any](objs S) []client.ObjectKey

Types

type Expectations

type Expectations struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...NewOption) *Expectations

func (*Expectations) CreationObserved

func (e *Expectations) CreationObserved(ctrlKey, createdKey client.ObjectKey)

func (*Expectations) Delete

func (e *Expectations) Delete(ctrlKey client.ObjectKey)

func (*Expectations) DeletionObserved

func (e *Expectations) DeletionObserved(ctrlKey, deletedKey client.ObjectKey)

func (*Expectations) ExpectCreations

func (e *Expectations) ExpectCreations(ctrlKey client.ObjectKey, createdKeys []client.ObjectKey)

func (*Expectations) ExpectCreationsAndDeletions

func (e *Expectations) ExpectCreationsAndDeletions(ctrlKey client.ObjectKey, createdKeys, deletedKeys []client.ObjectKey)

func (*Expectations) ExpectDeletions

func (e *Expectations) ExpectDeletions(ctrlKey client.ObjectKey, deletedKeys []client.ObjectKey)

func (*Expectations) Satisfied

func (e *Expectations) Satisfied(ctrlKey client.ObjectKey) bool

type NewOption

type NewOption interface {
	ApplyToNew(o *NewOptions)
}

type NewOptions

type NewOptions struct {
	Timeout time.Duration
}

func (*NewOptions) ApplyOptions

func (o *NewOptions) ApplyOptions(opts []NewOption)

func (*NewOptions) ApplyToNew

func (o *NewOptions) ApplyToNew(o2 *NewOptions)

type WithTimeout

type WithTimeout time.Duration

func (WithTimeout) ApplyToNew

func (w WithTimeout) ApplyToNew(o *NewOptions)

Jump to

Keyboard shortcuts

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