Skip to content

Commit

Permalink
Skip TestActions for Auditbeat on darwin/amd64 (#24648) (#24649)
Browse files Browse the repository at this point in the history
This skips TestActions, TestExcludedFiles, and TestIncludedExcludedFiles on darwin/amd64.
I could not reproduce this on my local macbook, but it's failing in the CI environment.

#24637
(cherry picked from commit c33ad9e)
  • Loading branch information
andrewkroh authored Mar 18, 2021
1 parent 5516684 commit 1d947ee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions auditbeat/module/file_integrity/metricset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func TestData(t *testing.T) {
}

func TestActions(t *testing.T) {
skipOnCIForDarwinAMD64(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -173,6 +175,8 @@ func TestActions(t *testing.T) {
}

func TestExcludedFiles(t *testing.T) {
skipOnCIForDarwinAMD64(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -227,6 +231,8 @@ func TestExcludedFiles(t *testing.T) {
}

func TestIncludedExcludedFiles(t *testing.T) {
skipOnCIForDarwinAMD64(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -980,3 +986,9 @@ func getConfig(path ...string) map[string]interface{} {
"exclude_files": []string{`(?i)\.sw[nop]$`, `[/\\]\.git([/\\]|$)`},
}
}

func skipOnCIForDarwinAMD64(t testing.TB) {
if os.Getenv("BUILD_ID") != "" && runtime.GOOS == "darwin" && runtime.GOARCH == "amd64" {
t.Skip("Skip test on CI for darwin/amd64")
}
}

0 comments on commit 1d947ee

Please sign in to comment.