helpers

package
v3.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreePort

func GetFreePort(t *testing.T) int

GetFreePort asks the kernel for a free open port that is ready to use. On top of that, it also makes sure that the port hasn't been used in the current test run yet to reduce chances of a race condition in parallel tests.

func HTTPRouteEventuallyContainsConditions

func HTTPRouteEventuallyContainsConditions(ctx context.Context, t *testing.T, client ctrlclient.Client, nn k8stypes.NamespacedName, conds ...metav1.Condition) func() bool

HTTPRouteEventuallyContainsConditions returns a predicate function that can be used with assert.Eventually or require.Eventually in order to check - via the provided client - that the HTTPRoute with the NamespacedName as provided in the arguments, does indeed contain the provied conditions in the status.

func HTTPRouteEventuallyNotContainsConditions

func HTTPRouteEventuallyNotContainsConditions(ctx context.Context, t *testing.T, client ctrlclient.Client, nn k8stypes.NamespacedName, conds ...metav1.Condition) func() bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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