test(cli): pin that update -y never deletes project indexes (#2200) - #2353
Merged
Merged
Conversation
On 0.9.0, `update -y` in a non-interactive shell auto-confirmed "Delete these indexes and continue with update?", removed every project index, and only then failed at the ui/standard variant chooser: no new binary and no indexes. The behaviour is already gone on main: 9ecabe0 moved self-update out of the product, so a release `update` only hands off to install.sh; install.sh runs `install -y --force`, which keeps existing indexes unless the user passes the explicit --reset-indexes (#607); and the variant chooser is gone, with --ui/--standard accepted as no-ops (#1544). The only coverage of the hand-off was a Windows-only test that checks the binary, not the indexes. Add a portable regression test that drives the exact release dispatch (activation seam off) with `update -y` and `update -y --standard` against an isolated HOME/CBM_CACHE_DIR holding three .db indexes, and asserts exit 0 with every index byte-for-byte intact. A generic -y must never be read as consent to delete indexes. Re-injecting the 0.9.0 prompt-then-delete step into the hand-off turns it RED (kept == 0). Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
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.
On 0.9.0,
update -yin a non-interactive shell auto-confirmed "Deletethese indexes and continue with update?", removed every project index,
and only then failed at the ui/standard variant chooser: no new binary
and no indexes. The behaviour is already gone on main: 9ecabe0 moved
self-update out of the product, so a release
updateonly hands off toinstall.sh; install.sh runs
install -y --force, which keeps existingindexes unless the user passes the explicit --reset-indexes (#607); and
the variant chooser is gone, with --ui/--standard accepted as no-ops
(#1544). The only coverage of the hand-off was a Windows-only test that
checks the binary, not the indexes.
Add a portable regression test that drives the exact release dispatch
(activation seam off) with
update -yandupdate -y --standardagainst an isolated HOME/CBM_CACHE_DIR holding three .db indexes, and
asserts exit 0 with every index byte-for-byte intact. A generic -y must
never be read as consent to delete indexes. Re-injecting the 0.9.0
prompt-then-delete step into the hand-off turns it RED (kept == 0).
Fixes #2200