feat(v5.2.0): finalize Infrastructure & Polish (tests isolation, xdist, lint, CI)
FlowDeck CI / lint (push) Successful in 43s
FlowDeck CI / test (push) Successful in 4m2s
FlowDeck CI / lint (pull_request) Successful in 42s
FlowDeck CI / test (pull_request) Successful in 4m3s
FlowDeck CI / docker (push) Successful in 1m2s
FlowDeck CI / docker (pull_request) Successful in 35s

tests/conftest.py: mutate the settings singleton (instead of rebinding) so DB + backup dir are isolated per test -> pytest-xdist safe.
Real backup tests (snapshot/prune/admin API) and OAuth mock tests (Gitea/GitHub/link) replace the previous skips.
init_db() now also creates webhook_subscriptions (full schema without the FastAPI lifespan).
ruff check is clean; .eslintrc.json migrated to eslint.config.mjs (flat config).
CI: lint job (ruff + eslint), parallel tests (-n auto), run on every branch push.
VERSION 5.11.1.
This commit is contained in:
2026-09-11 23:36:53 -04:00
parent 881c3e3e0a
commit ba363eaee9
42 changed files with 566 additions and 206 deletions
+8 -8
View File
@@ -3,19 +3,18 @@ and v5.5.0 (embed, bookmark, video, audio, cover, icon)."""
from __future__ import annotations
import json
import tempfile
import os
import pytest
import tempfile
# ── Helpers ──────────────────────────────────────────────────────────────
def _login(client):
"""Create admin user and return session cookie + csrf token (like test_app.py)."""
import secrets
from app.auth.session import SessionManager
from app.db import get_conn
import secrets
with get_conn() as conn:
login = f"testadmin_{secrets.token_hex(4)}"
@@ -167,7 +166,7 @@ class TestV54VersionHistory:
)
data2 = r2.json()
assert len(data2["versions"]) >= 2
v2_id = data2["versions"][0]["id"]
data2["versions"][0]["id"]
# restore v1
r3 = client.post(
@@ -191,10 +190,11 @@ class TestV54TrashPurge:
"""v5.4.0: global trash 30-day purge."""
def test_trash_purge_removes_old_deleted_pages(self, client):
from app.services.trash import purge_expired
from app.db import init_db, get_conn
import datetime
from app.db import get_conn, init_db
from app.services.trash import purge_expired
# create temp DB
tmp = tempfile.NamedTemporaryFile(suffix=".db", delete=False)
tmp.close()
@@ -565,4 +565,4 @@ class TestDashboardPublicNewBlocks:
assert "<video" in html
assert "<audio" in html
assert "bookmark" in html or "Ex" in html
assert "iframe" in html
assert "iframe" in html