assert

package
Version: v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertAllContainersHaveEnvVar added in v1.1.1

func AssertAllContainersHaveEnvVar(t *testing.T, podSpec *corev1.PodSpec, key, value string)

func AssertConditionStatus added in v1.1.6

func AssertConditionStatus(t *testing.T, cd *hivev1.ClusterDeployment, condType hivev1.ClusterDeploymentConditionType, status corev1.ConditionStatus)

AssertConditionStatus asserts if a condition is present on the cluster deployment and has the expected status

func AssertConditions added in v1.1.6

func AssertConditions(t *testing.T, cd *hivev1.ClusterDeployment, expectedConditions []hivev1.ClusterDeploymentCondition)

AssertConditions asserts if the expected conditions are present on the cluster deployment. It also asserts if those conditions have the expected status and reason

func AssertEqualWhereItCounts added in v1.1.6

func AssertEqualWhereItCounts(t *testing.T, x, y runtime.Object, msg string)

AssertEqualWhereItCounts compares two runtime.Objects, ignoring their ResourceVersion and TypeMeta, asserting that they are otherwise equal. This and cleanRVAndTypeMeta were borrowed/adapted from: https://github.com/openshift/ci-tools/blob/179a0edb6c003aa95ae1332692c5b4c79e58f674/pkg/testhelper/testhelper.go#L157-L175

func BetweenTimes

func BetweenTimes(t *testing.T, actual, startTime, endTime time.Time, msgAndArgs ...interface{}) bool

BetweenTimes asserts that the time is within the time window, inclusive of the start and end times.

assert.BetweenTimes(t, time.Now(), time.Now().Add(-10*time.Second), time.Now().Add(10*time.Second))

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL