testutil

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FluidUnitTestEnv = "FLUID_UNIT_TEST"

Variables

This section is empty.

Functions

func DeepEqualIgnoringSliceOrder

func DeepEqualIgnoringSliceOrder(t assert.TestingT, x interface{}, y interface{}) bool

DeepEqualIgnoringSliceOrder is much like reflect.DeepEqual but ignores order of slices in any structs. This is a function only used for unit tests since many objects in Kubernetes should be considered same ignoring the slice order(e.g. VolumeMounts, Volumes, EnvVar, etc.) NOTE: The func cannot handle recursive composite types like [][]interface, map[X][]interface, etc.

func IsUnitTest added in v1.0.0

func IsUnitTest() bool

func SortEnvVarByName

func SortEnvVarByName(envs []corev1.EnvVar, name string) []corev1.EnvVar

SortEnvVarByName sorts the value of an environment variable by its name

Types

This section is empty.

Jump to

Keyboard shortcuts

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