MCPcopy Create free account
hub / github.com/DataDog/datadog-agent / TestBuildDebugString

Function TestBuildDebugString

pkg/serverless/debug/debug_test.go:14–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestBuildDebugString(t *testing.T) {
15 t.Setenv("DD_AAA", "aaa")
16 t.Setenv("DD_CCC", "ccc")
17 t.Setenv("DD_BBB", "bbb")
18 t.Setenv("DD_API_KEY", "dontShowIt")
19 t.Setenv("hi", "hello")
20
21 res := buildDebugString()
22 // cannot check for strict equality as the CI adds some env variables (ie : DD_REPO_BRANCH_NAME)
23 assert.Regexp(t, "Datadog extension version : xxx\\|Datadog environment variables: ((DD_)?.*)DD_AAA=aaa\\|((DD_)?.*)DD_API_KEY=\\*\\*\\*\\|((DD_)?.*)DD_BBB=bbb\\|((DD_)?.*)DD_CCC=ccc\\|((DD_)?.*)", res)
24}
25
26func TestObfuscatePairIfNeededInvalid(t *testing.T) {
27 assert.Empty(t, obfuscatePairIfNeeded("toto", nil))

Callers

nothing calls this directly

Calls 1

buildDebugStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…