MCPcopy
hub / github.com/grafana/tempo / TestSSEConfigEncryptionKeyRedacted

Function TestSSEConfigEncryptionKeyRedacted

tempodb/backend/s3/config_test.go:12–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestSSEConfigEncryptionKeyRedacted(t *testing.T) {
13 const plaintext = "my-super-secret-key"
14
15 var key flagext.Secret
16 require.NoError(t, key.Set(plaintext))
17
18 cfg := SSEConfig{
19 Type: SSEC,
20 CustomerEncryptionKey: key,
21 }
22
23 out, err := yaml.Marshal(cfg)
24 require.NoError(t, err)
25
26 assert.NotContains(t, string(out), plaintext, "plaintext encryption key must not appear in YAML output")
27 assert.Contains(t, string(out), "********", "redacted marker must appear in YAML output")
28}

Callers

nothing calls this directly

Calls 2

SetMethod · 0.65
MarshalMethod · 0.65

Tested by

no test coverage detected