Skip to content

[8.19](backport #48970) test: add coverage for CLI input/confirm errors and reload name conflict#49340

Merged
rdner merged 1 commit into8.19from
mergify/bp/8.19/pr-48970
Apr 16, 2026
Merged

[8.19](backport #48970) test: add coverage for CLI input/confirm errors and reload name conflict#49340
rdner merged 1 commit into8.19from
mergify/bp/8.19/pr-48970

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Mar 8, 2026

Summary

  • add TestReadInputError to cover input() scanner failure path when stdin reaches EOF
  • add TestConfirmInvalidInputRetry and TestConfirmInputError to cover invalid answer retry messaging and scanner failure handling in confirm()
  • add TestReRegisterFailsReverseType to cover list-first then single-object registration conflict in the reload registry

Why this matters

These tests exercise real error and conflict branches that were previously untested, making regressions in user input handling and reload registration validation detectable.

Tests run

  • go test ./libbeat/common/cli ./libbeat/common/reload
  • go test -cover ./libbeat/common/cli ./libbeat/common/reload

Both commands passed.

AI generated by Test Improvement Agent


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

…ict (#48970)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Bill Easton <bill.easton@elastic.co>
(cherry picked from commit 94fc2ab)
@mergify mergify Bot requested a review from a team as a code owner March 8, 2026 04:22
@mergify mergify Bot added the backport label Mar 8, 2026
@mergify mergify Bot requested review from orestisfl and rdner and removed request for a team March 8, 2026 04:22
@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

🤖 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 release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team skip-changelog labels Mar 8, 2026
@botelastic botelastic Bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 8, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@rdner rdner merged commit 98eb3fb into 8.19 Apr 16, 2026
205 checks passed
@rdner rdner deleted the mergify/bp/8.19/pr-48970 branch April 16, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-note:skip The PR should be ignored when processing the changelog 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