e2eutil

package
v0.36.0-flux.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const TestIDLabel = "test-id"

Variables

View Source
var RunWithNoErr = RunCollectNoErr

Functions

func ApplyUnstructured

func ApplyUnstructured(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func AssertUnstructuredAvailable

func AssertUnstructuredAvailable(obj *unstructured.Unstructured)

func AssertUnstructuredCount

func AssertUnstructuredCount(ctx context.Context, c client.Client, obj *unstructured.Unstructured, count int)

func AssertUnstructuredDoesNotExist

func AssertUnstructuredDoesNotExist(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func CreateInventoryCRD

func CreateInventoryCRD(ctx context.Context, c client.Client)

func CreateRandomNamespace

func CreateRandomNamespace(ctx context.Context, c client.Client) *v1.Namespace

func CreateUnstructuredAndWait

func CreateUnstructuredAndWait(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func DeleteAllUnstructuredIfExists

func DeleteAllUnstructuredIfExists(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func DeleteInventoryCRD

func DeleteInventoryCRD(ctx context.Context, c client.Client)

func DeleteNamespace

func DeleteNamespace(ctx context.Context, c client.Client, namespace *v1.Namespace)

func DeleteUnstructuredAndWait

func DeleteUnstructuredAndWait(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func DeleteUnstructuredIfExists

func DeleteUnstructuredIfExists(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func ExpectNoEventErrors

func ExpectNoEventErrors(events []event.Event, callerSkip ...int)

func ExpectNoReconcileTimeouts

func ExpectNoReconcileTimeouts(events []event.Event, callerSkip ...int)

func FilterOptionalEvents

func FilterOptionalEvents(expected, received []testutil.ExpEvent) ([]testutil.ExpEvent, []testutil.ExpEvent)

FilterOptionalEvents looks for optional events in the expected list and removes them from both lists. This allows the output to be compared for equality.

Optional events include: - WaitEvent with ReconcilePending

func IsFlowControlEnabled

func IsFlowControlEnabled(config *rest.Config) bool

func ManifestToUnstructured

func ManifestToUnstructured(manifest []byte) *unstructured.Unstructured

func PodWithImage

func PodWithImage(obj *unstructured.Unstructured, containerName, image string) *unstructured.Unstructured

func RandomString

func RandomString(prefix string) string

func Run

func Run(ch <-chan event.Event) error

func RunCollect

func RunCollect(ch <-chan event.Event) []event.Event

func RunCollectNoErr

func RunCollectNoErr(ch <-chan event.Event, callerSkip ...int) []event.Event

func TemplateToUnstructured

func TemplateToUnstructured(tmpl string, data interface{}) *unstructured.Unstructured

func UnstructuredExistsAndIsNotTerminating

func UnstructuredExistsAndIsNotTerminating(ctx context.Context, c client.Client, obj *unstructured.Unstructured) bool

func UnstructuredIsTerminating

func UnstructuredIsTerminating(obj *unstructured.Unstructured) bool

func UnstructuredNamespace

func UnstructuredNamespace(name string) *unstructured.Unstructured

func UserAgent

func UserAgent(suffix string) string

UserAgent returns the a User-Agent for use with HTTP clients. The string corresponds to the current version of the binary being executed, using metadata from git and go.

func WaitForCreation

func WaitForCreation(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func WaitForDeletion

func WaitForDeletion(ctx context.Context, c client.Client, obj *unstructured.Unstructured)

func WithAnnotation

func WithAnnotation(obj *unstructured.Unstructured, key, value string) *unstructured.Unstructured

func WithFinalizer

func WithFinalizer(obj *unstructured.Unstructured, finalizer string) *unstructured.Unstructured

func WithNamespace

func WithNamespace(obj *unstructured.Unstructured, namespace string) *unstructured.Unstructured

func WithNodeSelector

func WithNodeSelector(obj *unstructured.Unstructured, key, value string) *unstructured.Unstructured

func WithReplicas

func WithReplicas(obj *unstructured.Unstructured, replicas int) *unstructured.Unstructured

Types

This section is empty.

Jump to

Keyboard shortcuts

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