diff --git a/.buildkite/filebeat/filebeat-pipeline.yml b/.buildkite/filebeat/filebeat-pipeline.yml index 4738c7ad1bd..83a07ac1f44 100644 --- a/.buildkite/filebeat/filebeat-pipeline.yml +++ b/.buildkite/filebeat/filebeat-pipeline.yml @@ -98,38 +98,10 @@ steps: context: "filebeat: Ubuntu x86_64 Unit Tests" - label: ":ubuntu: Filebeat: Go Integration Tests" - command: | - cd filebeat - mage goIntegTest - retry: - automatic: - - limit: 1 - agents: - provider: "gcp" - image: "${IMAGE_UBUNTU_X86_64}" - machineType: "${GCP_HI_PERF_MACHINE_TYPE}" - artifact_paths: - - "filebeat/build/*.xml" - - "filebeat/build/*.json" - - "filebeat/build/integration-tests/*" - - "filebeat/build/integration-tests/Test*/*" - - "filebeat/build/integration-tests/Test*/data/**/*" - plugins: - - test-collector#v1.10.2: - files: "filebeat/build/TEST-*.xml" - format: "junit" - branches: "main" - debug: true - notify: - - github_commit_status: - context: "filebeat: Go Integration Tests" - - - label: ":ubuntu: Filebeat: Integration tests as Root" command: | sudo usermod -a -G systemd-journal $$USER cd filebeat - go test -v -count=1 -tags=integration -run=TestSystemLogs ./tests/integration - go go test -v -count=1 -tags=integration -run=TestDebugBuildKite ./tests/integration + mage goIntegTest retry: automatic: - limit: 1 @@ -140,7 +112,6 @@ steps: artifact_paths: - "filebeat/build/*.xml" - "filebeat/build/*.json" - - "filebeat/build/integration-tests/*" - "filebeat/build/integration-tests/Test*/*" - "filebeat/build/integration-tests/Test*/data/**/*" plugins: diff --git a/filebeat/tests/integration/systemlogs_all_test.go b/filebeat/tests/integration/systemlogs_all_test.go index 4e5e6d8d370..6026bc3f5c1 100644 --- a/filebeat/tests/integration/systemlogs_all_test.go +++ b/filebeat/tests/integration/systemlogs_all_test.go @@ -25,7 +25,6 @@ import ( "io" "os" "path/filepath" - "strconv" "testing" "time" @@ -52,32 +51,6 @@ func copyModulesDir(t *testing.T, dst string) { } } -//nolint:unused,nolintlint // necessary on Linux -func skipOnBuildKite(t *testing.T) { - val, isSet := os.LookupEnv("BUILDKITE") - if !isSet { - // if the envvar BUILDKITE is not set, we're not on BuildKite, - // so return false (do not skip any test) - return - } - - buildkite, err := strconv.ParseBool(val) - if err != nil { - t.Fatalf("cannot parse '%s' as bool: %s", val, err) - } - - if !buildkite { - // We're not on BuildKite, do not skip any test - return - } - - // os.Geteuid() == 0 means we're root. - // If we're not root, skip the test - if os.Geteuid() != 0 { - t.Skip("this test can only run on BuildKite as root") - } -} - //nolint:unused,nolintlint // necessary on Linux func writeToFile(t *testing.T, data []byte, name string) { if err := os.MkdirAll(filepath.Join("../", "../", "build", "integration-tests"), 0750); err != nil { diff --git a/filebeat/tests/integration/systemlogs_linux_test.go b/filebeat/tests/integration/systemlogs_linux_test.go index 243a3135c22..0b072778358 100644 --- a/filebeat/tests/integration/systemlogs_linux_test.go +++ b/filebeat/tests/integration/systemlogs_linux_test.go @@ -33,7 +33,6 @@ import ( // correctly choose and start a journald input when the globs defined in // var.paths do not resolve to any file. func TestSystemLogsCanUseJournaldInput(t *testing.T) { - skipOnBuildKite(t) filebeat := integration.NewBeat( t, "filebeat",