GRI-2206: pass replace=true in re_assigning_a_device_replaces_its_previous_playlist #318

Merged
vivy merged 1 commit from test/GRI-2206-reassign-playlist-replace-contract into dev 2026-11-17 22:46:14 +00:00
Member

Forge #310 / PR #317 (GRI-2201) changes device assignment to refuse a silent
move: re-assigning an already-assigned device without replace: true now
returns 409 device_already_assigned instead of silently moving the device.

re_assigning_a_device_replaces_its_previous_playlist in
crates/server/tests/playlist_integration.rs predates that contract and
asserted the old silent-move behaviour (200, moved) on the second assign
request. This updates the test to pass "replace": true on that second
request, preserving its original intent (move the device onto a second
playlist, then delete the first) under the new contract.

Fail-first evidence (unmodified test against feature/GRI-2201-assign-playlist-guards
tip, 618ca78):

thread 're_assigning_a_device_replaces_its_previous_playlist' panicked at crates/server/tests/playlist_integration.rs:1168:5:
assertion `left == right` failed
  left: 409
 right: 200

With the fix applied, cargo test -p server --test playlist_integration re_assigning_a_device_replaces_its_previous_playlist -- --include-ignored passes both against that branch and against dev (where replace is simply ignored today).

./scripts/local-gates.sh --rust-only passes on this branch.

Forge #310 / PR #317 (GRI-2201) changes device assignment to refuse a silent move: re-assigning an already-assigned device without `replace: true` now returns `409 device_already_assigned` instead of silently moving the device. `re_assigning_a_device_replaces_its_previous_playlist` in `crates/server/tests/playlist_integration.rs` predates that contract and asserted the old silent-move behaviour (`200`, moved) on the second assign request. This updates the test to pass `"replace": true` on that second request, preserving its original intent (move the device onto a second playlist, then delete the first) under the new contract. Fail-first evidence (unmodified test against `feature/GRI-2201-assign-playlist-guards` tip, 618ca78): ``` thread 're_assigning_a_device_replaces_its_previous_playlist' panicked at crates/server/tests/playlist_integration.rs:1168:5: assertion `left == right` failed left: 409 right: 200 ``` With the fix applied, `cargo test -p server --test playlist_integration re_assigning_a_device_replaces_its_previous_playlist -- --include-ignored` passes both against that branch and against `dev` (where `replace` is simply ignored today). `./scripts/local-gates.sh --rust-only` passes on this branch.
GRI-2206: pass replace=true on second assign in re_assigning_a_device_replaces_its_previous_playlist
All checks were successful
CI / the pre-push hook (pull_request) Successful in 3s
CI / cargo fmt (pull_request) Successful in 3s
CI / install.sh client upgrade (pull_request) Successful in 13s
CI / cargo deny (pull_request) Successful in 17s
CI / cargo deny advisories (pull_request) Successful in 25s
CI / repository boundary (pull_request) Successful in 3s
CI / cargo clippy (pull_request) Successful in 1m8s
CI / frontend-web (pull_request) Successful in 1m5s
CI / cargo test (pull_request) Successful in 3m31s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
26349cb1fb
vivy merged commit 5e14bb9b55 into dev 2026-11-17 22:46:14 +00:00
vivy deleted branch test/GRI-2206-reassign-playlist-replace-contract 2026-11-17 22:46:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grimoirix/grimoire-of-digital-signage!318
No description provided.