Skip to content

Commit c33ad9e

Browse files
authored
Skip TestActions for Auditbeat on darwin/amd64 (#24648)
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
1 parent 41ae9ab commit c33ad9e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

auditbeat/module/file_integrity/metricset_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ func TestData(t *testing.T) {
6565
}
6666

6767
func TestActions(t *testing.T) {
68+
skipOnCIForDarwinAMD64(t)
69+
6870
defer abtest.SetupDataDir(t)()
6971

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

175177
func TestExcludedFiles(t *testing.T) {
178+
skipOnCIForDarwinAMD64(t)
179+
176180
defer abtest.SetupDataDir(t)()
177181

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

229233
func TestIncludedExcludedFiles(t *testing.T) {
234+
skipOnCIForDarwinAMD64(t)
235+
230236
defer abtest.SetupDataDir(t)()
231237

232238
bucket, err := datastore.OpenBucket(bucketName)
@@ -980,3 +986,9 @@ func getConfig(path ...string) map[string]interface{} {
980986
"exclude_files": []string{`(?i)\.sw[nop]$`, `[/\\]\.git([/\\]|$)`},
981987
}
982988
}
989+
990+
func skipOnCIForDarwinAMD64(t testing.TB) {
991+
if os.Getenv("BUILD_ID") != "" && runtime.GOOS == "darwin" && runtime.GOARCH == "amd64" {
992+
t.Skip("Skip test on CI for darwin/amd64")
993+
}
994+
}

0 commit comments

Comments
 (0)