MCPcopy
hub / github.com/argoproj/argo-workflows / TestContext

Function TestContext

util/logging/test_hook.go:77–79  ·  view source on GitHub ↗

TestContext returns a newcontext with the default logger, for use in tests only

(ctx context.Context)

Source from the content-addressed store, hash-verified

75
76// TestContext returns a newcontext with the default logger, for use in tests only
77func TestContext(ctx context.Context) context.Context {
78 return WithLogger(ctx, NewSlogLogger(Info, Text).WithField("test", "true"))
79}

Callers 15

TestCRDExamplesFunction · 0.92
mainFunction · 0.92
TestStoppedWorkflowMethod · 0.92
TestInsufficientRoleMethod · 0.92
checkArtifactContentMethod · 0.92
TestExampleWorkflowsFunction · 0.92
BenchmarkWorkflowArchiveFunction · 0.92
createServiceAccountMethod · 0.92

Calls 3

WithLoggerFunction · 0.85
NewSlogLoggerFunction · 0.85
WithFieldMethod · 0.65

Tested by

no test coverage detected