GRI-2147: test POST /playlists with no default_duration_seconds inherits default #293

Merged
vivy merged 2 commits from test/GRI-2147-playlist-create-inherits-default into dev 2026-11-16 21:10:41 +00:00
Member

What

Adds the test coverage from forge #277 comment 14402, item 2: a server test
that POST /playlists with no default_duration_seconds stores NULL and
resolves to the campus/global default.

Branched from dev (the earlier branch for this issue, from PR #281, is
already merged and deleted).

Two tests added to crates/server/tests/playlist_integration.rs:

  • creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default
  • creating_a_playlist_with_no_default_duration_inherits_the_campus_override

Fail-first

Both tests pass against current dev (the feature landed in #281/#292; this
closes the coverage gap that was left open). Confirmed fail-first separately
against 281aede (dev before #281): both get 422 missing field default_duration_seconds, since the old contract required the value.

Criterion mapping

Forge #277 comment 14402, item 2 ("a server test that POST /playlists with no
default_duration_seconds stores NULL and returns source campus/global") -> the
two tests above, one per inheritance source (global, campus override).

Command run

SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \
  cargo test -p server --test playlist_integration \
  creating_a_playlist_with_no_default_duration -- --include-ignored --nocapture

Local gates (scripts/local-gates.sh --rust-only): exit 0, every gate passed.

## What Adds the test coverage from forge #277 comment 14402, item 2: a server test that `POST /playlists` with no `default_duration_seconds` stores `NULL` and resolves to the campus/global default. Branched from `dev` (the earlier branch for this issue, from PR #281, is already merged and deleted). Two tests added to `crates/server/tests/playlist_integration.rs`: - `creating_a_playlist_with_no_default_duration_stores_null_and_inherits_the_global_default` - `creating_a_playlist_with_no_default_duration_inherits_the_campus_override` ## Fail-first Both tests pass against current `dev` (the feature landed in #281/#292; this closes the coverage gap that was left open). Confirmed fail-first separately against `281aede` (dev before #281): both get `422 missing field default_duration_seconds`, since the old contract required the value. ## Criterion mapping Forge #277 comment 14402, item 2 ("a server test that POST /playlists with no default_duration_seconds stores NULL and returns source campus/global") -> the two tests above, one per inheritance source (global, campus override). ## Command run ``` SIGNAGE_TEST_DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable \ cargo test -p server --test playlist_integration \ creating_a_playlist_with_no_default_duration -- --include-ignored --nocapture ``` Local gates (`scripts/local-gates.sh --rust-only`): exit 0, every gate passed.
GRI-2147: cargo fmt
All checks were successful
CI / cargo fmt (pull_request) Successful in 4s
CI / the pre-push hook (pull_request) Successful in 5s
CI / install.sh client upgrade (pull_request) Successful in 12s
CI / cargo deny (pull_request) Successful in 19s
CI / cargo deny advisories (pull_request) Successful in 26s
CI / repository boundary (pull_request) Successful in 5s
CI / cargo clippy (pull_request) Successful in 1m9s
CI / frontend-web (pull_request) Successful in 1m1s
CI / cargo test (pull_request) Successful in 3m27s
CI / Notify gate failed (pull_request) Has been skipped
CI / CI (pull_request) Successful in 1s
2601323ea4
vivy merged commit 3d1c75eb9f into dev 2026-11-16 21:10:41 +00:00
vivy deleted branch test/GRI-2147-playlist-create-inherits-default 2026-11-16 21:10:42 +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!293
No description provided.