Skip to content

Commit

Permalink
testing framework: implement panic handling (#33525)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcervante authored Jul 19, 2023
1 parent 837716a commit 2cc81cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/command/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}()
Expand Down Expand Up @@ -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)
}()
Expand Down

0 comments on commit 2cc81cf

Please sign in to comment.