testloggingutil

package
v0.20.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LoggingE2ETestAnnotation is the annotation used by the TestCloudLogging E2E tests to verify
	// that the knative-gcp Controller and Webhook write to Cloud Logging. Essentially, if a Topic
	// has this annotation, then the value of this annotation is written into the logs (the value
	// is expected to be a UUID generated by the test).
	LoggingE2ETestAnnotation = "events.cloud.google.com/e2eLoggingTest"

	// LoggingE2ETestEnvVarName is the name of the environment variable used to send containers a
	// string for them to log. This is used in the TestCloudLogging E2E tests to verify logs are
	// showing up in Cloud Logging.
	LoggingE2ETestEnvVarName = "E2E_LOGGING_TEST"

	// LoggingE2EFieldName is the name of the JSON field that includes the value of the annotation.
	// Used in the TestCloudLogging E2E tests to verify logs are showing up in Cloud Logging.
	LoggingE2EFieldName = "e2eLoggingTestField"
)

Variables

This section is empty.

Functions

func LogBasedOnAnnotations

func LogBasedOnAnnotations(logger *zap.Logger, annotations map[string]string)

LogBasedOnAnnotations is used by the TestLogging* E2E tests. It logs values, using the provided logger, based on the annotations.

func LogBasedOnEnv

func LogBasedOnEnv(logger *zap.Logger)

LogBasedOnEnv is used by the TestLogging* E2E tests. It logs values, using the provided logger, based on the environment variables.

func PropagateLoggingE2ETestAnnotation

func PropagateLoggingE2ETestAnnotation(inputAnnotations map[string]string, outputEnvVars []v1.EnvVar) []v1.EnvVar

PropagateLoggingE2ETestAnnotation propagates the annotation used by the TestLogging* E2E tests. It returns the updated environment variables that should be used in that container.

Types

This section is empty.

Jump to

Keyboard shortcuts

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