Never swallow errors

This commit is contained in:
Pieter Noordhuis 2024-10-01 11:22:53 -07:00
parent b54c10b832
commit 37b0039c1c
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
1 changed files with 2 additions and 1 deletions

View File

@ -11,9 +11,10 @@ import (
)
func Mutate(t *testing.T, b *bundle.Bundle, f func(v dyn.Value) (dyn.Value, error)) {
bundle.ApplyFunc(context.Background(), b, func(ctx context.Context, b *bundle.Bundle) diag.Diagnostics {
diags := bundle.ApplyFunc(context.Background(), b, func(ctx context.Context, b *bundle.Bundle) diag.Diagnostics {
err := b.Config.Mutate(f)
require.NoError(t, err)
return nil
})
require.NoError(t, diags.Error())
}