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_dump_commands
Lucas Bajolet 1 year ago
parent 35eed086c1
commit cb1a4af5dd

@ -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

Loading…
Cancel
Save