Skip to content

test: cover the version and completion paths Codecov flagged - #29

Merged
boeboe merged 1 commit into
mainfrom
test/patch-coverage
Nov 7, 2026
Merged

boeboe merged 1 commit into
mainfrom
test/patch-coverage

Conversation

@boeboe

@boeboe boeboe commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #28. Codecov flagged 8 uncovered patch lines in cmd/flag_completion.go: the whole of completeInterfaces, the value completion of --interface.

How they are covered now:

  • TestCompleteInterfaceFlag runs __complete discover --interface "" and checks the candidates are the host's network interfaces, with no file completion.
  • TestCompleteInterfacesError covers the branch where listing the interfaces fails. To make that failure injectable, net.Interfaces is now called through a package variable netInterfaces; behaviour is unchanged.

Test-only otherwise; no RELEASE.md entry. make check and make e2e pass locally.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boeboe
boeboe merged commit c5134fd into main Nov 7, 2026
23 checks passed
@boeboe
boeboe deleted the test/patch-coverage branch November 7, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant