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

Enable tests that were muted during migration #40387

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
PRIVATE_CI_GCS_CREDENTIALS_PATH="kv/ci-shared/platform-ingest/gcp-platform-ingest-ci-service-account"

if [[ "$BUILDKITE_PIPELINE_SLUG" == "beats-xpack-packetbeat" && "$BUILDKITE_STEP_KEY" == *"system-tests"* ]]; then
PRIVATE_CI_GCS_CREDENTIALS_SECRET=$(retry -t 5 -- vault kv get -field plaintext -format=json ${PRIVATE_CI_GCS_CREDENTIALS_PATH})
PRIVATE_CI_GCS_CREDENTIALS_SECRET=$(vault kv get -field plaintext -format=json ${PRIVATE_CI_GCS_CREDENTIALS_PATH})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oakrizan Is this related to the test enablement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, since win doesn't have minfrin/retry

export PRIVATE_CI_GCS_CREDENTIALS_SECRET
fi

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/x-pack/pipeline.xpack.heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ steps:
- group: "Extended Windows Tests"
key: "x-pack-heartbeat-extended-win-tests"
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*[Ww]indows.*/
skip: "skipping due to elastic/beats#23957 and elastic/beats#23958"
# skip: "skipping due to elastic/beats#23957 and elastic/beats#23958"

steps:
- label: ":windows: x-pack/heartbeat: Win 10 Unit Tests"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/x-pack/pipeline.xpack.metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ steps:
context: "x-pack/metricbeat: macOS x86_64 Unit Tests"

- label: ":mac: x-pack/metricbeat: macOS arm64 Unit Tests"
skip: "Skipping due to elastic/beats#33036 & elastic/beats#40496"
# skip: "Skipping due to elastic/beats#33036 & elastic/beats#40496"
# https://github.com/elastic/beats/issues/33036 https://github.com/elastic/beats/issues/40496
if: build.env("BUILDKITE_PULL_REQUEST") == "false" || build.env("GITHUB_PR_LABELS") =~ /.*macOS.*/
command: |
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/x-pack/pipeline.xpack.packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ steps:

- label: ":windows: x-pack/packetbeat: Win 2022 System Tests"
key: "mandatory-win-2022-system-tests"
skip: "skipping due to elastic/beats#38142"
# skip: "skipping due to elastic/beats#38142"
command: |
Set-Location -Path x-pack/packetbeat
mage systemTest
Expand Down Expand Up @@ -250,7 +250,7 @@ steps:

- label: ":windows: x-pack/packetbeat: Win 10 System Tests"
key: "extended-win-10-system-tests"
skip: "skipping due to elastic/beats#38142"
# skip: "skipping due to elastic/beats#38142"
command: |
Set-Location -Path x-pack/packetbeat
mage systemTest
Expand Down
12 changes: 0 additions & 12 deletions auditbeat/module/file_integrity/fileinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import (
)

func TestNewMetadata(t *testing.T) {
// Can be removed after https://github.com/elastic/beats/issues/37701 is solved
skipOnBuildkiteDarwin(t, "Group check")

f, err := os.CreateTemp(t.TempDir(), "metadata")
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -98,9 +95,6 @@ func TestNewMetadata(t *testing.T) {
}

func TestSetUIDSetGIDBits(t *testing.T) {
// Can be removed after https://github.com/elastic/beats/issues/37701 is solved
skipOnBuildkiteDarwin(t, "Wheel permission issue")

f, err := os.CreateTemp(t.TempDir(), "setuid")
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -154,9 +148,3 @@ func TestSetUIDSetGIDBits(t *testing.T) {
assert.Equal(t, flags&os.ModeSetgid != 0, meta.SetGID)
}
}

func skipOnBuildkiteDarwin(t testing.TB, reason string) {
if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" {
t.Skip("Skip test on Buildkite MacOS: Wheel permission while expected staff")
}
}
27 changes: 0 additions & 27 deletions auditbeat/module/file_integrity/metricset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func TestData(t *testing.T) {
func TestActions(t *testing.T) {
skipOnCIForDarwinAMD64(t)

// Can be removed after https://github.com/elastic/ingest-dev/issues/3016 is solved
skipOnBuildkiteWindows(t)
// Can be removed after https://github.com/elastic/ingest-dev/issues/3076 is solved
skipOnBuildkiteDarwinArm(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -161,11 +156,6 @@ func TestActions(t *testing.T) {
func TestExcludedFiles(t *testing.T) {
skipOnCIForDarwinAMD64(t)

// Can be removed after https://github.com/elastic/ingest-dev/issues/3016 is solved
skipOnBuildkiteWindows(t)
// Can be removed after https://github.com/elastic/ingest-dev/issues/3076 is solved
skipOnBuildkiteDarwinArm(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -213,11 +203,6 @@ func TestExcludedFiles(t *testing.T) {
func TestIncludedExcludedFiles(t *testing.T) {
skipOnCIForDarwinAMD64(t)

// Can be removed after https://github.com/elastic/ingest-dev/issues/3016 is solved
skipOnBuildkiteWindows(t)
// Can be removed after https://github.com/elastic/ingest-dev/issues/3076 is solved
skipOnBuildkiteDarwinArm(t)

defer abtest.SetupDataDir(t)()

bucket, err := datastore.OpenBucket(bucketName)
Expand Down Expand Up @@ -965,15 +950,3 @@ func skipOnCIForDarwinAMD64(t testing.TB) {
t.Skip("Skip test on CI for darwin/amd64")
}
}

func skipOnBuildkiteWindows(t testing.TB) {
if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "windows" {
t.Skip("Skip on Buildkite Windows: Shortened TMP problem")
}
}

func skipOnBuildkiteDarwinArm(t testing.TB) {
if os.Getenv("BUILDKITE") == "true" && runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
t.Skip("Skip test on Buldkite: unexpected path error")
}
}
2 changes: 1 addition & 1 deletion metricbeat/module/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_diskio(self):
self.assertCountEqual(
SYSTEM_DISK_HOST_FIELDS, host_disk.keys())

@unittest.skipUnless(re.match("(?i)win|linux|freebsd|openbsd", sys.platform), "os")
@unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd|openbsd", sys.platform), "os")
def test_filesystem(self):
"""
Test system/filesystem output.
Expand Down
3 changes: 1 addition & 2 deletions metricbeat/tests/system/test_reload.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def test_reload(self):
self.wait_until(lambda: self.output_lines() > 0)
proc.check_kill_and_wait()

# windows is disabled, see https://github.com/elastic/beats/issues/37841
@unittest.skipUnless(re.match("(?i)linux|darwin|freebsd|openbsd", sys.platform), "os")
@unittest.skipUnless(re.match("(?i)win|linux|darwin|freebsd|openbsd", sys.platform), "os")
def test_start_stop(self):
"""
Test if module is properly started and stopped
Expand Down
Loading