Skip to content

Binary e2e tests#1812

Merged
dgageot merged 4 commits intodocker:mainfrom
gtardif:binary_e2e_tests
Feb 21, 2026
Merged

Binary e2e tests#1812
dgageot merged 4 commits intodocker:mainfrom
gtardif:binary_e2e_tests

Conversation

@gtardif
Copy link
Contributor

@gtardif gtardif commented Feb 20, 2026

Also fixes error handling not executing on subcommands when running docker cli plugin

Adds only a few secs to the CI tests, since it's already all compiled for go test

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
@gtardif gtardif marked this pull request as ready for review February 20, 2026 18:04
@gtardif gtardif requested a review from a team as a code owner February 20, 2026 18:04
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

I've reviewed the added code in this PR and found no issues. The implementation is clean and correct.

Changes Reviewed

cmd/root/root.go - New setErrorHandlingRecursive function properly wraps error handling for all subcommands and their children. The recursive implementation correctly applies error processing to the entire command tree.

e2e/binary/shellout.go - Test utility functions are well-structured with proper error handling. The ExecWithContextInDir function correctly inherits environment variables as intended for test scenarios.

e2e/binary/binary_test.go - Tests cover the important execution modes (CLI plugin, cagent, docker-agent) and validate both help output and error handling.

Taskfile.yml - Build and test tasks are properly configured with the new test-binary task depending on deploy-local to ensure binaries are built before testing.

.github/workflows/ci.yml - Workflow correctly adds task test-binary to the test step.

The PR successfully addresses the stated goal of fixing error handling for subcommands when running as a docker cli plugin.

@dgageot dgageot merged commit 70175d3 into docker:main Feb 21, 2026
8 checks passed
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.

2 participants