From 37b0039c1c041a89e0567678f9f327b897858c3b Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Tue, 1 Oct 2024 11:22:53 -0700 Subject: [PATCH] Never swallow errors --- bundle/internal/bundletest/mutate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundle/internal/bundletest/mutate.go b/bundle/internal/bundletest/mutate.go index c30870dd..c0ac630c 100644 --- a/bundle/internal/bundletest/mutate.go +++ b/bundle/internal/bundletest/mutate.go @@ -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()) }