mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
config: fix error message for unexpected result of yaml marshal
This commit is contained in:
parent
0f3d8ea075
commit
6c67296423
|
@ -539,7 +539,8 @@ func TestElideSecrets(t *testing.T) {
|
||||||
yamlConfig := string(config)
|
yamlConfig := string(config)
|
||||||
|
|
||||||
matches := secretRe.FindAllStringIndex(yamlConfig, -1)
|
matches := secretRe.FindAllStringIndex(yamlConfig, -1)
|
||||||
testutil.Assert(t, len(matches) == 6 && !strings.Contains(yamlConfig, "mysecret"),
|
testutil.Assert(t, len(matches) == 6, "wrong number of secret matches found")
|
||||||
|
testutil.Assert(t, !strings.Contains(yamlConfig, "mysecret"),
|
||||||
"yaml marshal reveals authentication credentials.")
|
"yaml marshal reveals authentication credentials.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue