Skip to content

[8.x](backport #42172) [tests] Fix packetbeat system tests on windows#42482

Merged
marc-gr merged 3 commits into8.xfrom
mergify/bp/8.x/pr-42172
Jan 30, 2025
Merged

[8.x](backport #42172) [tests] Fix packetbeat system tests on windows#42482
marc-gr merged 3 commits into8.xfrom
mergify/bp/8.x/pr-42172

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 30, 2025

Proposed commit message

In windows net.Interfaces() and pcap.FindAllDevs() naming are inconsistent. This changes the way we check in tests to fallback to find them by address, making the process more robust.

It also reenables npcap installation during CI tests to validate the installation process. CI windows images were rebuilt for that purpose.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Related issues


This is an automatic backport of pull request #42172 done by [Mergify](https://mergify.com).

* Fix packetbeat system tests on windows

* Add retry if needed in pre command hook

* Add hook path

* Undo retry changes

* Remove retry in hook

* Undo version change

* Fix test

* Do not skip npcap installation for system tests

* Revert "Do not skip npcap installation for system tests"

This reverts commit 90a8265.

* Enable npcap installation on CI

* use dot sourcing for ps

* source in pre-command

* test win10 image

* fix image name

* Revert "fix image name"

This reverts commit 587a00e.

* Revert "test win10 image"

This reverts commit 95b7dea.

* test win10 image

* Revert "test win10 image"

This reverts commit 7ae9b46.

* Move out of hook

* update gcp auth script

* call script instead of dot sourcing

(cherry picked from commit 2b61d40)

# Conflicts:
#	.buildkite/x-pack/pipeline.xpack.packetbeat.yml
@mergify mergify bot requested a review from a team as a code owner January 30, 2025 12:17
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jan 30, 2025
@mergify mergify bot requested a review from a team as a code owner January 30, 2025 12:17
@mergify
Copy link
Contributor Author

mergify bot commented Jan 30, 2025

Cherry-pick of 2b61d40 has failed:

On branch mergify/bp/8.x/pr-42172
Your branch is up to date with 'origin/8.x'.

You are currently cherry-picking commit 2b61d4073.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .buildkite/scripts/gcp_auth.ps1
	modified:   x-pack/packetbeat/magefile.go
	modified:   x-pack/packetbeat/tests/system/app_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   .buildkite/x-pack/pipeline.xpack.packetbeat.yml

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 30, 2025
@github-actions github-actions bot added Packetbeat failed-test indicates a failed automation test relates Team:Security-Linux Platform Linux Platform Team in Security Solution Team:Security-Windows Platform Windows Platform Team in Security Solution labels Jan 30, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jan 30, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/sec-windows-platform (Team:Security-Windows Platform)

@elasticmachine
Copy link
Contributor

Pinging @elastic/sec-linux-platform (Team:Security-Linux Platform)

@marc-gr marc-gr enabled auto-merge (squash) January 30, 2025 14:59
@marc-gr marc-gr merged commit f7fbf43 into 8.x Jan 30, 2025
6 checks passed
@marc-gr marc-gr deleted the mergify/bp/8.x/pr-42172 branch January 30, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request failed-test indicates a failed automation test relates Packetbeat Team:Security-Linux Platform Linux Platform Team in Security Solution Team:Security-Windows Platform Windows Platform Team in Security Solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants