Skip to content

test: add command execution verification tests#181

Merged
joshrotenberg merged 1 commit intomainfrom
test/command-execution-verification
Dec 11, 2025
Merged

test: add command execution verification tests#181
joshrotenberg merged 1 commit intomainfrom
test/command-execution-verification

Conversation

@joshrotenberg
Copy link
Copy Markdown
Owner

Summary

Adds tests to catch bugs like the docker docker issue (#176, fixed in #180).

Changes

  1. New test file: tests/command_execution_test.rs with 40 tests verifying each command's build_command_args() returns the command name as the first element (not 'docker').

  2. Bug fix: ImagesCommand::build_command_args() was missing 'images' as the first element. This would have caused the same docker docker bug for the images command.

Why This Helps

These tests ensure that:

Test Coverage

Tests added for: attach, build, commit, cp, create, diff, events, exec, export, history, images, import, info, inspect, kill, load, login, logout, logs, pause, port, ps, pull, push, rename, restart, rm, rmi, run, save, search, start, stats, stop, tag, top, unpause, update, version, wait

- Add tests to verify build_command_args() returns command name as first element
- Fix ImagesCommand which was missing 'images' in build_command_args()
- This would have caused 'docker docker' bug for images command
- 40 tests covering all major commands
@joshrotenberg joshrotenberg merged commit cdd6eb2 into main Dec 11, 2025
11 checks passed
@joshrotenberg joshrotenberg deleted the test/command-execution-verification branch December 11, 2025 20:02
@github-actions github-actions Bot mentioned this pull request Dec 11, 2025
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