Skip to content

Commit

Permalink
enabled win tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed May 30, 2024
1 parent 03d5424 commit 8a7961d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
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 @@ -132,7 +132,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 @@ -222,7 +222,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
13 changes: 4 additions & 9 deletions x-pack/packetbeat/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,6 @@ func SystemTest(ctx context.Context) error {
return devtools.GoTest(ctx, args)
}

func getBucketName() string {
if os.Getenv("BUILDKITE") == "true" {
return "ingest-buildkite-ci"
}
return "obs-ci-cache"
}

// getNpcapInstaller gets the installer from the Google Cloud Storage service.
//
// On Windows platforms, if getNpcapInstaller is invoked with the environment variables
Expand All @@ -191,6 +184,9 @@ func getNpcapInstaller() error {
if runtime.GOOS != "windows" {
return nil
}
if runtime.GOOS == "windows" && os.Getenv("BUILDKITE") == "true" {
return nil
}
if os.Getenv("CI") != "true" && os.Getenv("NPCAP_LOCAL") != "true" {
return errors.New("only available if running in the CI or with NPCAP_LOCAL=true")
}
Expand All @@ -205,8 +201,7 @@ func getNpcapInstaller() error {
return err
}
}
ciBucketName := getBucketName()

fmt.Printf("getting %s from private cache\n", installer)
return sh.RunV("gsutil", "cp", "gs://"+ciBucketName+"/private/"+installer, dstPath)
return sh.RunV("gsutil", "cp", "gs://obs-ci-cache/private/"+installer, dstPath)
}
1 change: 1 addition & 0 deletions x-pack/packetbeat/tests/system/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestDevices(t *testing.T) {
expected = append(expected, fmt.Sprintf("%d:%s:%s", ifc.Index, ifc.Name, ifc.Flags))
}
t.Log("Expect interfaces:\n", expected)
t.Log("Actual interfaces:\n", stdout)

for _, ifc := range ifcs {
assert.Contains(t, stdout, ifc.Name)
Expand Down

0 comments on commit 8a7961d

Please sign in to comment.