diff --git a/auditbeat/module/file_integrity/exeobjparser_test.go b/auditbeat/module/file_integrity/exeobjparser_test.go index f8ca144e4ed..9952cd7825b 100644 --- a/auditbeat/module/file_integrity/exeobjparser_test.go +++ b/auditbeat/module/file_integrity/exeobjparser_test.go @@ -48,7 +48,7 @@ func TestExeObjParser(t *testing.T) { } if _, ci := os.LookupEnv("CI"); ci { - if _, err := os.Stat(target); err != nil && errors.Is(fs.ErrNotExist, err) { + if _, err := os.Stat(target); err != nil && errors.Is(err, fs.ErrNotExist) { t.Skip("skipping test because target binary was not found: see https://github.com/elastic/beats/issues/38211") } } @@ -56,7 +56,7 @@ func TestExeObjParser(t *testing.T) { got := make(mapstr.M) err := exeObjParser(nil).Parse(got, target) if err != nil { - t.Errorf("unexpected error calling exeObjParser.Parse: %v", err) + t.Fatalf("unexpected error calling exeObjParser.Parse: %v", err) } fields := []struct {