funcs

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package funcs contains convenience functions for working with e2e-framework

Index

Constants

View Source
const DefaultPollInterval = time.Millisecond * 500

DefaultPollInterval is the suggested poll interval for wait.For.

Variables

This section is empty.

Functions

func AddBlueprintTypeToScheme

func AddBlueprintTypeToScheme() env.Func

AddBlueprintTypeToScheme adds the blueprint operator's custom resources to the environment's scheme so that the environment's client can work with these types.

func AddonHaveStatusWithin

func AddonHaveStatusWithin(d time.Duration, addon *v1alpha1.Addon, desired v1alpha1.StatusType) features.Func

AddonHaveStatusWithin fails a test if the supplied addon do not have (i.e. become) the supplied status within the supplied duration.

func AllOf

func AllOf(fns ...features.Func) features.Func

AllOf runs the supplied functions in order

func ApplyHandler

func ApplyHandler(r *resources.Resources, manager string) decoder.HandlerFunc

ApplyHandler is a decoder.Handler that uses server-side apply to apply the supplied object.

func ApplyResources

func ApplyResources(manager, dir, pattern string, options ...decoder.DecodeOption) features.Func

ApplyResources applies all manifests under the supplied directory that match the supplied glob pattern (e.g. *.yaml). It uses server-side apply - fields are managed by the supplied field manager. It fails the test if any supplied resource cannot be applied successfully.

func CertificateHaveStatusWithin

func CertificateHaveStatusWithin(d time.Duration, cert *certmanager.Certificate, desired certmanagermeta.ConditionStatus) features.Func

CertificateHaveStatusWithin fails a test if the supplied certificate does not have (i.e. become) the supplied status within the supplied duration.

func ClusterIssuerHaveStatusWithin

func ClusterIssuerHaveStatusWithin(d time.Duration, ci *certmanager.ClusterIssuer, desired certmanagermeta.ConditionStatus) features.Func

ClusterIssuerHaveStatusWithin fails a test if the supplied cluster issuer do not have (i.e. become) the supplied status within the supplied duration.

func ComponentResourcesCreatedWithin

func ComponentResourcesCreatedWithin(d time.Duration, objects ...runtime.Object) features.Func

func DeleteResource

func DeleteResource(o k8s.Object) features.Func

DeleteResource deletes (from the environment) the supplied resource.

func DeleteResources

func DeleteResources(dir, pattern string) features.Func

DeleteResources deletes (from the environment) all resources defined by the manifests under the supplied directory that match the supplied glob pattern (e.g. *.yaml).

func DeploymentBecomesAvailableWithin

func DeploymentBecomesAvailableWithin(d time.Duration, namespace, name string) features.Func

DeploymentBecomesAvailableWithin fails a test if the supplied Deployment is not Available within the supplied duration.

func InstallBlueprintOperator

func InstallBlueprintOperator(img string) env.Func

InstallBlueprintOperator installs the blueprint operator

func IssuerHaveStatusWithin

func IssuerHaveStatusWithin(d time.Duration, issuer *certmanager.Issuer, desired certmanagermeta.ConditionStatus) features.Func

IssuerHaveStatusWithin fails a test if the supplied issuer do not have (i.e. become) the supplied status within the supplied duration.

func ResourceDeletedWithin

func ResourceDeletedWithin(d time.Duration, o k8s.Object) features.Func

ResourceDeletedWithin fails a test if the supplied resource is not deleted within the supplied duration.

func ResourceMatchWithin

func ResourceMatchWithin(d time.Duration, o k8s.Object, matcher ResourceMatcher) features.Func

ResourceMatchWithin fails a test if the supplied resource does not match the supplied matcher within the supplied duration.

func ResourcesCreatedWithin

func ResourcesCreatedWithin(d time.Duration, dir, pattern string) features.Func

ResourcesCreatedWithin fails a test if the supplied resources are not found to exist within the supplied duration.

func ResourcesDeletedWithin

func ResourcesDeletedWithin(d time.Duration, dir, pattern string) features.Func

ResourcesDeletedWithin fails a test if the supplied resources are not deleted within the supplied duration.

func SleepFor

func SleepFor(d time.Duration) env.FeatureFunc

SleepFor is a feature function that sleeps for a given duration after running a feature

Types

type ResourceMatcher

type ResourceMatcher func(object k8s.Object) bool

ResourceMatcher is a function that returns true if the supplied resource matches the desired state.

Jump to

Keyboard shortcuts

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