Skip to content

Commit

Permalink
updated pre-command hook
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Aug 13, 2024
1 parent 787b4ed commit 55cc581
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 40 deletions.
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})
export PRIVATE_CI_GCS_CREDENTIALS_SECRET
fi

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 := ioutil.TempFile("", "metadata")
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -99,9 +96,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 := ioutil.TempFile("", "setuid")
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -156,9 +150,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 @@ -67,11 +67,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 @@ -182,11 +177,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 @@ -243,11 +233,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 @@ -1007,15 +992,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")
}
}

0 comments on commit 55cc581

Please sign in to comment.