testing

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 26 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPipelineRunConditionStatusAndReason added in v1.2.0

func CheckPipelineRunConditionStatusAndReason(
	t *testing.T,
	prStatus v1.PipelineRunStatus,
	expectedStatus corev1.ConditionStatus,
	expectedReason string,
)

func ConfigMapFromTestFile

func ConfigMapFromTestFile(t *testing.T, name string) *corev1.ConfigMap

ConfigMapFromTestFile creates a v1.ConfigMap from a YAML file It loads the YAML file from the testdata folder.

func NewAlphaFeatureFlagsConfigMapInSlice added in v1.3.0

func NewAlphaFeatureFlagsConfigMapInSlice() []*corev1.ConfigMap

func NewAlphaFeatureFlagsConfigMapWithMatrixInSlice added in v1.3.0

func NewAlphaFeatureFlagsConfigMapWithMatrixInSlice(count int) []*corev1.ConfigMap

func NewDefaultsCofigMapInSlice added in v1.3.0

func NewDefaultsCofigMapInSlice() []*corev1.ConfigMap

func NewFeatureFlagsConfigMapInSlice added in v1.3.0

func NewFeatureFlagsConfigMapInSlice() []*corev1.ConfigMap

func NewFeatureFlagsConfigMapWithMatrixInSlice added in v1.3.0

func NewFeatureFlagsConfigMapWithMatrixInSlice(count int) []*corev1.ConfigMap

func SetupDefaultContext added in v0.41.0

func SetupDefaultContext(t *testing.T) (context.Context, []controller.Informer)

SetupDefaultContext sets up the Context and the default filtered informers for the tests.

func SetupFakeCloudClientContext added in v0.42.0

func SetupFakeCloudClientContext(ctx context.Context, expectedEventCount int) context.Context

SetupFakeCloudClientContext sets up the fakeclient to context

func SetupFakeContext added in v0.8.0

func SetupFakeContext(t *testing.T) (context.Context, []controller.Informer)

SetupFakeContext sets up the Context and the fake filtered informers for the tests.

func TestLogger added in v0.8.0

func TestLogger(t *testing.T) *zap.SugaredLogger

TestLogger sets up the Logger

func VerifyCustomRunOrRunStatusesCount added in v1.2.0

func VerifyCustomRunOrRunStatusesCount(t *testing.T, prStatus v1.PipelineRunStatus, expectedCount int)

func VerifyCustomRunOrRunStatusesNames added in v1.2.0

func VerifyCustomRunOrRunStatusesNames(t *testing.T, prStatus v1.PipelineRunStatus, expectedNames ...string)

func VerifyTaskRunStatusesCount added in v1.2.0

func VerifyTaskRunStatusesCount(t *testing.T, prStatus v1.PipelineRunStatus, expectedCount int)

func VerifyTaskRunStatusesNames added in v1.2.0

func VerifyTaskRunStatusesNames(t *testing.T, prStatus v1.PipelineRunStatus, expectedNames ...string)

func VerifyTaskRunStatusesWhenExpressions added in v1.2.0

func VerifyTaskRunStatusesWhenExpressions(t *testing.T, prStatus v1.PipelineRunStatus, trName string, expectedWhen []v1.WhenExpression)

func WithLogger added in v0.8.0

func WithLogger(ctx context.Context, t *testing.T) context.Context

WithLogger returns the Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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