Skip to content

Commit

Permalink
Merge 7823d15 into backport/fix_locals_eval_order/hugely-welcome-rodent
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-packer authored Jun 17, 2024
2 parents 3f31520 + 7823d15 commit f4021be
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packer_test/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ func (pc *packerCommand) Run() (string, string, error) {

pc.err = cmd.Run()

// Check that the command didn't panic, and if it did, we can immediately error
panicErr := PanicCheck{}.Check(pc.stdout.String(), pc.stderr.String(), pc.err)
if panicErr != nil {
pc.t.Fatalf("Packer panicked during execution: %s", panicErr)
}

return pc.stdout.String(), pc.stderr.String(), pc.err
}

Expand All @@ -147,8 +153,6 @@ func (pc *packerCommand) Assert(checks ...Checker) {
attempt++
stdout, stderr, err := pc.Run()

checks = append(checks, PanicCheck{})

for _, check := range checks {
checkErr := check.Check(stdout, stderr, err)
if checkErr != nil {
Expand Down

0 comments on commit f4021be

Please sign in to comment.