elastic / elastic/beats

[docs-patrol] Update integration testing docs for TestMain auto-build

Open Beginner friendly
#50,168 1 comment 0 reactions 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

Recent code changes in the repository have introduced documentation drift. The following changes need corresponding documentation updates.

## Changes Requiring Documentation Updates

### 1. Go integration tests now auto-build test binaries via `TestMainWithBuild`, but docs still require `mage buildSystemTestBinary`

**Commit(s):**
- 323f731f84e5d8e55a1bc3248b568097dbb402bb ([link](https://github.com/elastic/beats/commit/323f731f84e5d8e55a1bc3248b568097dbb402bb))

**What changed:**
- `filebeat/magefile.go` marks `BuildSystemTestBinary` as deprecated for Go integration tests and prints:
- `"The test binary is now built automatically via TestMain."`
- Go integration tests now call `integration.TestMainWithBuild(m, "filebeat")` in `filebeat/tests/integration/integration_test.go`.
- `libbeat/tests/integration/framework.go` implements `TestMainWithBuild` and performs `testbin.Build(...)` automatically before running tests.

**Documentation impact:**
- `docs/extend/testing.md` still presents `mage buildSystemTestBinary` as a required step for Go integration tests (`# Build the test binary` before `go test ... -tags integration`).
- `docs/extend/testing.md` also states: `To create the testing binary run mage buildSystemTestBinary.`
- `filebeat/input/journald/README.md` still instructs manual test flow with `mage buildSystemTestBinary` before the Go integration test command.

These instructions are now outdated for Go integration tests and should be updated to avoid unnecessary/incorrect setup steps.

## Suggested Actions

- [ ] Update `docs/extend/testing.md` Go integration section to state that test binaries are auto-built via `TestMainWithBuild`.
- [ ] Clarify in `docs/extend/testing.md` that `mage buildSystemTestBinary` is only required for Python system-test workflows (if applicable), not Go integration tests.
- [ ] Update `filebeat/input/journald/README.md` manual integration-test instructions to remove (or explicitly re-scope) the `mage buildSystemTestBinary` prerequisite for Go integration tests.

> [!NOTE]
>
> 🔒 Integrity filter blocked 96 items
>
> The following items were blocked because they don't meet the GitHub integrity level.
>
> - [#43508](https://github.com/elastic/beats/issues/43508) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#44537](https://github.com/elastic/beats/issues/44537) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#43006](https://github.com/elastic/beats/issues/43006) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50033](https://github.com/elastic/beats/issues/50033) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#40503](https://github.com/elastic/beats/issues/40503) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49986](https://github.com/elastic/beats/issues/49986) `search_issues`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50112](https://github.com/elastic/beats/pull/50112) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50111](https://github.com/elastic/beats/pull/50111) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50113](https://github.com/elastic/beats/pull/50113) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#50142](https://github.com/elastic/beats/pull/50142) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49796](https://github.com/elastic/beats/pull/49796) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49850](https://github.com/elastic/beats/pull/49850) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49849](https://github.com/elastic/beats/pull/49849) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49848](https://github.com/elastic/beats/pull/49848) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49503](https://github.com/elastic/beats/pull/49503) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - [#49870](https://github.com/elastic/beats/pull/49870) `search_pull_requests`: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
> - ... and 80 more items
>
> To allow these resources, lower `min-integrity` in your GitHub frontmatter:
>
> ```yaml
> tools:
> github:
> min-integrity: approved # merged | approved | unapproved | none
> ```
>
>

---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Docs Patrol](https://github.com/elastic/beats/actions/runs/24516301439)

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
> - [x] expires on Apr 23, 2026, 2:53 PM UTC

Contributor guide

Open the contributing guide

Research direction

Read docs/extend/testing.md and filebeat/input/journald/README.md, then compare their Go integration instructions with TestMainWithBuild in filebeat/tests/integration/integration_test.go and libbeat/tests/integration/framework.go. Update the two documentation flows to reflect automatic test-binary builds and keep mage buildSystemTestBinary scoped correctly. Done means the Go instructions no longer require an unnecessary manual build step.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
documentation, testing
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.