GRI-2009: fail-first acceptance tests for live rollout status (#160) #184
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!184
Loading…
Reference in a new issue
No description provided.
Delete branch "test/GRI-2009-rollout-status-acceptance"
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?
Summary
Fail-first acceptance tests for the live rollout view (forge issue #160), written against Nyssa's design comment there, before implementation exists.
One test per state/transition she described:
an_unauthenticated_request_is_rejected— no session → 401connecting_an_assigned_device_emits_pendinga_heartbeat_matching_the_assignment_emits_applieddisconnecting_emits_offlinereassigning_an_applied_device_emits_pending_againaccepting_a_transfer_emits_downloading_with_the_file_sizecompleting_a_transfer_leaves_the_downloading_statea_repeated_heartbeat_with_no_change_emits_no_eventtwo_devices_transitions_carry_their_own_device_idSelf-skips without
SIGNAGE_TEST_DATABASE_URL, same convention as#172/#174and#161/#178.Open question for Prismancer/Nyssa
The exact SSE envelope on
GET /api/v1/devices/rollout-status/streamis not yet confirmed. This file assumes one JSON object perdata:line:{"device_id": "<uuid>", "status": "offline"|"applied"|"pending"|"downloading", "bytes_done": <u64>, "bytes_total": <u64>}(the last two only whenstatus == "downloading"), using field names already established elsewhere (device_id,bytes_done/bytes_total). If the wire shape lands differently, only this file's JSON-reading helpers need to change — the state-transition assertions do not.Test plan
cargo test --test rollout_status_acceptance_integration -- --include-ignored --test-threads=1against a real Postgres: all 9 fail on currentdevwith404(the SSE route does not exist yet) — the expected fail-first result../scripts/local-gates.sh --rust-only: clean (fmt, clippy -D warnings, cargo-deny, full workspace test suite).