Test the update check's store failures and what an API token's request is told
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start with crates/adapters/store/src/row.rs (release_check) and crates/adapters/store/src/lib.rs (release_check, keep_release_check) to see how a corrupt update_version and a failing database surface as StoreError, then read app::updates::CheckForUpdates and its store fake in the app tests to see how the loop reacts and logs. For part 2 read answer_told in crates/adapters/http/src/sign_in.rs and the existing the_session_route_tells_the_available_update_with_the_build test, then decide whether an API-token request gets available-update and record the answer in §4.6 or §10.7. Done when each new test fails if its behavior changes and decision 107 point 7 is reflected.
Written by the indexing model from the issue text.
Description
#802 (update notice, #513 stage 1) left two paths without a test. Its review named both as P3 test gaps, and the maintainer wants them covered.
1. The store's release-check failure branches
In crates/adapters/store:
row::release_checkrefuses a storedupdate_versionthat isn't a version (reader.corrupt("update_version", …)). No test seeds a corrupt row and checks that the read fails as corrupt, nor whatapp::updates::CheckForUpdatesdoes then. Decision 107, point 7, says the next check overwrites a version this build couldn't have written rather than stop checking.release_checkandkeep_release_check(lib.rs) returnStoreErrorwhen the database fails. No test drives either failure throughCheckForUpdatesto show the loop logs it and keeps checking: no panic, no stop, and no notice lost or invented.
Tests: a store test with a corrupt release_check row; app tests with the store fake failing on read and on write, asserting what the loop does next and what the log says.
2. available-update on a request made with an API token
The session route (crates/adapters/http/src/sign_in.rs, answer_told) adds build and available-update whenever the build is shown. the_session_route_tells_the_available_update_with_the_build covers a signed-in session. Nothing pins what a request made with an API token gets. Decide and pin one of:
- the same as a session (the current behavior), or
- nothing, because a token's scopes don't cover it.
Either way, it's one test, plus a line in §4.6 or §10.7 if the answer isn't already written down.
Acceptance
Each case above has a test that fails if its behavior changes. For 2, the design states the answer.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 56m
- Merged PRs (30d)
- 349
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nledford/Ladderback
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nledford/Ladderback#809 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nledford/Ladderback#759 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nledford/Ladderback#746 ·
Maintainers usually reply within 1 day
-
enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nledford/Ladderback#745 ·
Maintainers usually reply within 1 day
-
bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nledford/Ladderback#647 ·
Maintainers usually reply within 1 day
All issues in nledford/Ladderback
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
matrix-org/matrix-rust-sdk#7495 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yantrikos/yantrik-os#1272 ·
Maintainers usually reply within 1 day
-
crate: spate-kafka priority: low tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
macOS 菜单栏托盘图标保留橙色,与系统单色图标风格不一致Possibly taken @xhugoliu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
YizhengWw/HachimoDock#56 · 1 comment ·