Dev-Seed: lars@stommer.com als Portal-Admin bei jedem Start sicherstellen.
Deploy Development / deploy (push) Successful in 34s
Test Suite / pytest-backend (push) Successful in 9s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-07-04 22:25:11 +02:00
1 parent 598677d343
commit 88792eeb47
6 files changed
+226 -4

No files matched your search

+17
View File
@@ -35,3 +35,20 @@ def test_cleanup_seed_removes_example_com_users():
def test_cleanup_seed_is_idempotent():
assert run_seeds.main(["--only", "seed_001_cleanup_pytest_artifacts"]) == 0
assert run_seeds.main(["--only", "seed_001_cleanup_pytest_artifacts"]) == 0
def test_dev_admin_seed_ensures_lars():
import os
if os.getenv("ENVIRONMENT", "development").strip().lower() == "production":
return
from auth import get_user_by_email, verify_password
from services.dev_admin import DEV_ADMIN_EMAIL, DEV_ADMIN_PASSWORD
assert run_seeds.main(["--only", "seed_003_ensure_dev_admin"]) == 0
user = get_user_by_email(DEV_ADMIN_EMAIL)
assert user is not None
assert user["portal_role"] == "admin"
assert verify_password(DEV_ADMIN_PASSWORD, user["password_hash"])