GRI-2200: fail-first server tests for assign refusals (campus_mismatch, device_already_assigned) #315
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!315
Loading…
Reference in a new issue
No description provided.
Delete branch "test/GRI-2200-assign-refusal-tests"
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
POST /api/v1/devices/{device_id}/playlistcampus check (every role, ordering before "already assigned", not skipped byreplace: true), already-assigned 409 vs same-playlist 200 vsreplace: truemove, and the device/playlist campus-change refusals onPATCH /api/v1/devices/{device_id}andPATCH /api/v1/playlists/{playlist_id}.replace,campus_mismatchordevice_already_assignedexists incrates/serveryet. GRI-2201 (Nyssa) implements the handlers against this file.Test plan
cargo test -p server --test assign_playlist_refusal_acceptance_integrationagainst a real PostgreSQL: 9 of 14 tests fail (the new refusals/campus-clearing, not yet implemented), 5 pass (already-true states: same-campus assign, no-campus-either-side assign, idempotent re-assign, andstore::assign's existing upsert already "moves" without areplaceflag).cargo fmt -p server --checkandcargo clippy -p server --test assign_playlist_refusal_acceptance_integration --locked -- -D warningsboth clean.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.