diff --git a/internal/command/test.go b/internal/command/test.go index c9ea6c29f0..111790c069 100644 --- a/internal/command/test.go +++ b/internal/command/test.go @@ -396,6 +396,7 @@ func (runner *TestRunner) execute(run *moduletest.Run, file *moduletest.File, co var plan *plans.Plan var planDiags tfdiags.Diagnostics go func() { + defer logging.PanicHandler() defer done() plan, planDiags = tfCtx.Plan(config, state, opts) }() @@ -442,6 +443,7 @@ func (runner *TestRunner) execute(run *moduletest.Run, file *moduletest.File, co var applyDiags tfdiags.Diagnostics go func() { + defer logging.PanicHandler() defer done() updated, applyDiags = tfCtx.Apply(plan, config) }()