config: fix error message for unexpected result of yaml marshal

This commit is contained in:
Alberto Cortés 2017-10-10 12:34:03 +02:00
parent 0f3d8ea075
commit 6c67296423
1 changed files with 2 additions and 1 deletions

View File

@ -539,7 +539,8 @@ func TestElideSecrets(t *testing.T) {
yamlConfig := string(config)
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.")
}