fix(tests): rendre la suite hermétique — pin oauth_redirect_uri + FLOWDECK_DATA_DIR temporel
- test_get_redirect_uri_from_host_header: épingle oauth_redirect_uri à vide pour tester la dérivation Host de façon isolée (le .env du projet définit OAUTH_REDIRECT_URI, qui passe prioritaire par design) - conftest: pose FLOWDECK_DATA_DIR vers un répertoire temporel inscriptible pour les tests emoji/docx/covers qui dépendaient de /data (conteneur) - ajoute scripts/audit_functional.py: audit de bout-en-bout des processus (notes, DB, tâches, partage, publication, export, recherche, agents) Suite locale: 538 passed
This commit is contained in:
@@ -20,6 +20,7 @@ def client():
|
||||
db_file.close()
|
||||
|
||||
backup_dir = tempfile.mkdtemp(prefix="fd_backups_")
|
||||
data_dir = tempfile.mkdtemp(prefix="fd_data_")
|
||||
|
||||
# Set env BEFORE importing app modules (config reads at import time).
|
||||
os.environ["DATABASE_URL"] = f"sqlite:///{db_path}"
|
||||
@@ -28,6 +29,9 @@ def client():
|
||||
os.environ["BACKUP_ENABLED"] = "true"
|
||||
os.environ["BACKUP_DIR"] = backup_dir
|
||||
os.environ["PROJECT_SYNC_ENABLED"] = "false"
|
||||
# Point data-root (uploads/, emoji/, covers/) at a writable temp dir so tests
|
||||
# don't depend on the container's /data path existing on a dev host.
|
||||
os.environ["FLOWDECK_DATA_DIR"] = data_dir
|
||||
|
||||
# IMPORTANT: mutate the existing Settings singleton in place — do NOT rebind
|
||||
# `app.config.settings`. Modules such as `app.services.backup` and
|
||||
|
||||
Reference in New Issue
Block a user