testing

package
v0.0.0-...-4fc8c9b Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 EnableFeatureFlagField

func EnableFeatureFlagField(ctx context.Context, t *testing.T, flagName string) context.Context

EnableFeatureFlagField enables a boolean feature flag in an existing context (for use in testing).

func SetupDefaultContext

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

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

func SetupFakeCloudClientContext

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

SetupFakeCloudClientContext sets up the fakeclient to context

func SetupFakeContext

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

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

func TestLogger

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

TestLogger sets up the Logger

func WithLogger

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