GRI-1856: setup/session integration tests #96
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!96
Loading…
Reference in a new issue
No description provided.
Delete branch "test/GRI-1856-setup-session-integration"
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
Server-testable setup/session acceptance criteria from
plan/tests/mvp-acceptance.md, written against the routes merged in #93 (/api/v1/setup/status,/api/v1/setup,/api/v1/session).Extends the real-TCP harness from #92 (
crates/server/tests/support/mod.rs) with a genericsend()/TestResponsehelper for arbitrary methods, headers and bodies.Criterion-to-test mapping
(AC-1-01, first-user setup creating an admin + session via the panel, is E2E and out of scope here.)
ac_1_02_setup_with_empty_username_is_rejected_and_creates_no_userac_1_02_setup_with_missing_password_field_is_rejected_and_creates_no_userac_1_03_setup_is_refused_once_a_user_exists_and_creates_no_second_adminac_1_04_login_with_correct_credentials_establishes_a_sessionac_1_05_login_with_wrong_password_is_rejected_and_establishes_no_sessionac_1_06_login_for_unknown_username_is_rejected_the_same_way_as_wrong_passwordEach "no user created" assertion is proved by behavior (the next
/setupcall still succeeding), not by reading the database directly.Finding: real validation gap, not a test bug
ac_1_02_setup_with_empty_username_is_rejected_and_creates_no_useris#[ignore]d with the reason recorded inline.POST /setupcurrently accepts an empty username and creates the account (201), contrary to AC-1-02. Fail-first output:The sibling case (missing
passwordfield) is already correctly rejected. This is a design/implementation gap for the back-end engineer to fix — un-ignoring this test is the regression check once it is.Test plan
cargo test -p server --test setup_session_integration— 5 passed, 1 ignored (the finding above)./scripts/local-gates.sh— every gate passed (fmt, clippy -D warnings, cargo test, cargo deny, frontend-web)