fix(test): fix 4 bugs in snapshot integration tests#344
Merged
DorianZheng merged 1 commit intomainfrom Mar 4, 2026
Merged
Conversation
- Fix wrong disk paths: use `disks/` subdirectory instead of box root - Fix handle invalidation: get fresh handle via runtime.get() after stop() - Remove false assertion that guest-rootfs exists in snapshot directory - Flip guest-rootfs assertion after restore (restore deletes it intentionally) - Fix stale DB record cleanup in GuestRootfsManager::find() - Add --features link-krun to integration test make target - Fix doc comments in disk/constants.rs to include disks/ path segment
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
boxes/{id}/disk.qcow2but actual path isboxes/{id}/disks/disk.qcow2. Addeddisks_dir()helper.stop()cancels the shutdown token, making the handle unusable forstart(). Fixed by callingruntime.get("test-box")to get a fresh handle after eachstop().restore_disks()intentionally deletes guest-rootfs so next start recreates it fresh. Flipped assertion to!exists().GuestRootfsManager::find()now deletes stale DB records when the backing file is missing.--features link-krun: Integration test make target was missing the feature flag.disk/constants.rspaths to includedisks/subdirectory.Test plan
cargo clippy -p boxlite --tests -- -D warnings— cleancargo fmt --check— cleanmake test:integration:rust— all 111 integration tests pass (including 5 snapshot tests)