assert

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

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