Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.12](backport #38441) auditbeat - skip TestExeObjParser on CI #38461

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions auditbeat/module/file_integrity/exeobjparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
package file_integrity

import (
"errors"
"fmt"
"io/fs"
"math"
"os"
"reflect"
"strconv"
"testing"
Expand All @@ -44,6 +47,12 @@ func TestExeObjParser(t *testing.T) {
t.Skip("skipping test on garbled PE file: see https://github.com/elastic/beats/issues/35705")
}

if _, ci := os.LookupEnv("CI"); ci {
if _, err := os.Stat(target); err != nil && errors.Is(fs.ErrNotExist, err) {
t.Skip("skipping test because target binary was not found: see https://github.com/elastic/beats/issues/38211")
}
}

got := make(mapstr.M)
err := exeObjParser(nil).Parse(got, target)
if err != nil {
Expand Down
Loading