test(smoke): assert the login shell serves on a fresh install - #6321
Open
Spoofiecus wants to merge 1 commit into
Open
Spoofiecus wants to merge 1 commit into
Spoofiecus wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The fresh-install smoke test added in #6294 proves the API is healthy on a clean install but never asserts that the UI itself is reachable — the smoke contract in #3968 explicitly lists "confirm the UI can become available when applicable". A regression that broke only the static/login shell (while
/api/healthstayed green) would pass the current smoke gate.This adds one test,
test_root_serves_login_shell_html, totests/test_smoke_install.py. It boots the app the same way the existing health test does (in-memory SQLite, every optional-service probe pointed at a dead port) and asserts thatGET /either serves the first-run login shell (HTML document with the responsive viewport meta) or redirects to/login— and follows that redirect to confirm the shell really comes back. A 5xx, an unexpected redirect target, or a non-HTML body fails.Target branch
**dev**, notmain. All PRs land indev.Type of Change
Linked Issue
Part of #3968 (fresh-install smoke contract — the "UI can become available" item).
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
All commands run with the project venv interpreter; all green before pushing:
./venv/bin/python -m pytest tests/test_smoke_install.py -v-> 11 passed (5 prior + the new one)./venv/bin/python -m py_compile tests/test_smoke_install.py-> cleangit diff --check-> cleanRuntime validation: the same scratch single-user instance used to validate the storage diagnostic (#6320) served
/as the login shell with the viewport meta — the assertions encode exactly that observed behavior (first-run redirect to/login, then an HTML shell document). No production code is touched; this is a test-only PR.Scope
One new test in the existing smoke-test file. No production code, no new fixtures, no new dependencies.