From cb1a4af5dddede72376ab75fac0a769206292f30 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 28 Mar 2025 10:25:13 -0400 Subject: [PATCH] packer_test: fix crash detection checker When running a black-box Packer test, crashes were to be detected automatically so that tests that crash are always reported as a failure. However, the match for detecting that Packer crashed was incorrectly formed, so those weren't detected. --- packer_test/common/check/gadgets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packer_test/common/check/gadgets.go b/packer_test/common/check/gadgets.go index 9eecc57cf..14761d98c 100644 --- a/packer_test/common/check/gadgets.go +++ b/packer_test/common/check/gadgets.go @@ -198,7 +198,7 @@ func (d dump) Check(stdout, stderr string, err error) error { type PanicCheck struct{} func (_ PanicCheck) Check(stdout, stderr string, _ error) error { - if strings.Contains(stdout, "= PACKER CRASH =") || strings.Contains(stderr, "= PACKER CRASH =") { + if strings.Contains(stdout, "! PACKER CRASH !") || strings.Contains(stderr, "! PACKER CRASH !") { return fmt.Errorf("packer has crashed: this is never normal and should be investigated") } return nil