refactor: per-exec user override structural cleanup#289
Closed
DorianZheng wants to merge 1 commit intomainfrom
Closed
refactor: per-exec user override structural cleanup#289DorianZheng wants to merge 1 commit intomainfrom
DorianZheng wants to merge 1 commit intomainfrom
Conversation
- Validate empty/whitespace user specs at BoxCommand::user() builder (shift-left from guest executor to host-side builder) - Simplify executor to pass user override directly (no empty-string guard) - Extract resolve_exec_user() method from inline logic in build_and_spawn() - Refactor integration tests with TestBox helper and table-driven approach - Add unit tests for empty-string and whitespace-only edge cases
4 tasks
Member
Author
|
Superseded by #291 which includes both the structural cleanup and the end-to-end wiring. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BoxCommand::user()now filters empty/whitespace strings toNoneat the builder layer, instead of guarding in the guest executorbuild_and_spawn()moved toContainerCommand::resolve_exec_user()TestBoxhelper eliminates copy-pasted setup/teardown; 3 override variants consolidated into a table-driven testTest plan
cargo test -p boxlite --lib -- exec::tests— 17 passed (2 new: empty string, whitespace)cargo clippy -p boxlite --lib -- -D warnings— cleancargo fmt --check— cleanmake test:integration— 100 passed, 0 leaky