Skip to content

[8.19](backport #49583) filebeat: auto-build test binary in Go integration tests via TestMain#50111

Merged
AndersonQ merged 2 commits into8.19from
mergify/bp/8.19/pr-49583
Apr 14, 2026
Merged

[8.19](backport #49583) filebeat: auto-build test binary in Go integration tests via TestMain#50111
AndersonQ merged 2 commits into8.19from
mergify/bp/8.19/pr-49583

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Apr 14, 2026

Proposed commit message

filebeat: auto-build test binary in Go integration tests via TestMain

Move the filebeat.test binary build step from the mage targets into TestMain so that `go test -tags integration` works without requiring a prior `mage buildSystemTestBinary`. This removes a manual prerequisite that tripped up developers running integration tests locally.

  - Add BuildSystemTestBinary helper to libbeat/tests/integration/framework.go
  - Add TestMain in filebeat and x-pack/filebeat integration test packages
  - Remove BuildSystemTestBinary from mage GoIntegTest/GoFIPSOnlyIntegTest
  - Python integration tests are unchanged (they still use devtools directly)

Assisted by Claude

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. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability.
  • [ ] I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

  • N/A

How to test this PR locally

  • Ensure there is not "SystemTestBinary", run any filebeat Go integration test, they'll works

Related issues

…#49583)

* filebeat: auto-build test binary in Go integration tests via TestMain

Move the filebeat.test binary build step from the mage targets into
TestMain so that `go test -tags integration` works without requiring
a prior `mage buildSystemTestBinary`. This removes a manual prerequisite
that tripped up developers running integration tests locally.

  - Add BuildSystemTestBinary helper to libbeat/tests/integration/framework.go
  - Add TestMain in filebeat and x-pack/filebeat integration test packages
  - Remove BuildSystemTestBinary from mage GoIntegTest/GoFIPSOnlyIntegTest
  - Python integration tests are unchanged (they still use devtools directly)

Assisted by Claude

(cherry picked from commit 323f731)

# Conflicts:
#	libbeat/tests/integration/framework.go
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Apr 14, 2026
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Apr 14, 2026

Cherry-pick of 323f731 has failed:

On branch mergify/bp/8.19/pr-49583
Your branch is up to date with 'origin/8.19'.

You are currently cherry-picking commit 323f731f8.
  (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:
	modified:   dev-tools/mage/gotest.go
	new file:   dev-tools/testbin/testbin.go
	modified:   filebeat/magefile.go
	new file:   filebeat/tests/integration/integration_test.go
	renamed:    filebeat/input/filestream/legacy_metrics_integration_test.go -> filebeat/tests/integration/legacy_metrics_integration_test.go
	modified:   libbeat/magefile.go
	new file:   libbeat/tests/integration/integration_test.go
	modified:   metricbeat/magefile.go
	new file:   metricbeat/tests/integration/integration_test.go
	modified:   x-pack/filebeat/magefile.go
	new file:   x-pack/filebeat/tests/integration/integration_test.go
	renamed:    x-pack/filebeat/input/gcppubsub/otel_test.go -> x-pack/filebeat/tests/integration/otel_gcppubsub_test.go
	new file:   x-pack/filebeat/tests/integration/testdata/gcp_pubsub_fake_credentials.json
	modified:   x-pack/libbeat/magefile.go
	new file:   x-pack/libbeat/tests/integration/integration_test.go
	modified:   x-pack/metricbeat/magefile.go
	new file:   x-pack/metricbeat/tests/integration/integration_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   libbeat/tests/integration/framework.go

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

@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Apr 14, 2026
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2026
@mergify mergify bot requested review from a team as code owners April 14, 2026 07:49
@mergify mergify bot requested review from faec and orestisfl and removed request for a team April 14, 2026 07:49
@github-actions
Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions bot added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Apr 14, 2026
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 14, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@AndersonQ AndersonQ merged commit 22e7c15 into 8.19 Apr 14, 2026
205 of 208 checks passed
@AndersonQ AndersonQ deleted the mergify/bp/8.19/pr-49583 branch April 14, 2026 15:33
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 skip-changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants