fix(tests): the launcher's tests follow version folders and builder protocol 2 #358
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!358
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/tests-after-protocol-2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After #352 (versions are their folders) and #353 (builder protocol 2),
cargo test --lockedon main had 24 failures and the translations check failed. Every failure was a stale test: each expected the old versions.json scan or the old builder command line. No launcher code changes. No test was loosened: each fixture now sets up what the new code needs, and the two assertions that changed now check the new behaviour.What was stale
From #352: a folder is a version only once it has
version.json(16 tests)builds/defaultbut no record, so the scan skipped it ("Pick your game files…", "does not belong to an installed Longshot version", wrong storage group, no reuse). New test helpersfake_listed_version/describe_fake_version(src/game/mod.rs) write the record a completed build writes. Used in jobs, actions, library, storage, mods, wizard (a discovered copy carries its record), reuse and romfs.prune::a_folder_an_earlier_launcher_retired_keeps_its_build: the rewritten test dropped theplayers::initializethe old one had, solist_profilesfailed on a missingprofiles/. It initializes the home again.registry::migration_keeps_ids…asserted that the retired folder's build was kept. #352's commit 4 removes retired folders that hold no saves or settings during the migration, and the code does exactly that. The test now asserts that the folder is gone (its path stays inpreviousFoldersfor Steam retargeting).From #353: protocol 2 (8 tests)
infoforprotocol: 2. The fake builders in mods (and its preflight tests), wizard update, reuse, romfs (it answered the old--help) and the releases fetch base now answerinfo. The mods fake builder reads the protocol 2mod --profile <p> --output jsonline, with no--cache.shortcuts.vdfwriter ended only theshortcutsmap. Steam ends the root map too (08 08), and the new strict VDF reader rightly refuses a library cut short. The writer is fixed.builder_cli::assume_speaks, test only). The Linux home test assertedLONGSHOT_DATA, which #353 removed on purpose. It now asserts the variable is absent, as process.rs's own test does.Translations: ko, pl and zh-Hant each lacked #353's two Settings strings.
Checklist
cargo test --locked(viatests/test_launcher_core.py),scripts/translations.py,cargo clippy --locked --workspace --all-targets -- -D warningsandcargo fmt --checkpass on Linux.🤖 Generated with Claude Code
a278caed3d34c809d627WIP: fix(tests): the launcher's tests follow version folders and builder protocol 2to fix(tests): the launcher's tests follow version folders and builder protocol 2