test: more verbose failure msg, use contains [ci skip]

This commit is contained in:
decentral1se 2024-04-06 23:48:22 +02:00
parent d21c35965d
commit a4de446f58
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 2 additions and 4 deletions

View File

@ -33,9 +33,7 @@ func TestReadSecretsConfigWithLongDomain(t *testing.T) {
composeFiles := []string{"./testdir/compose.yaml"}
_, err := ReadSecretsConfig("./testdir/.env.sample", composeFiles, "should_break_on_forty_eight_char_stack_nameeeeee")
if err == nil {
t.Fatal("Expected to fail")
t.Fatal("expected failure, stack name is too long")
}
// Check error
assert.Equal(t, "secret test_pass_one is > 64 chars when combined with should_break_on_forty_eight_char_stack_nameeeeee", err.Error())
assert.Contains(t, err.Error(), "is > 64 chars")
}