From 35ffc9f5e29e72840768edf45ec99ff94c883898 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 10 Jun 2026 14:27:35 -0700 Subject: [PATCH] tests: use soulsync-testdb- prefix in the web_server endpoint tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My credential/admin-gating endpoint tests override DATABASE_PATH at import to a temp dir, but with a custom prefix — which tripped the DB-isolation guard (test_database_path_env_is_isolated requires 'soulsync-testdb-' in the path) once those modules loaded. Still a temp DB (no real-DB risk), just the wrong prefix. Switched to the soulsync-testdb- prefix so isolation is preserved and the guard passes. --- tests/test_admin_gating.py | 2 +- tests/test_credentials_endpoints.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_admin_gating.py b/tests/test_admin_gating.py index 06dc1adf..6ca61f56 100644 --- a/tests/test_admin_gating.py +++ b/tests/test_admin_gating.py @@ -16,7 +16,7 @@ import tempfile import pytest -_TMP = tempfile.mkdtemp(prefix='ss-admin-gate-') +_TMP = tempfile.mkdtemp(prefix='soulsync-testdb-gate-') os.environ['DATABASE_PATH'] = os.path.join(_TMP, 'gate.db') os.environ['SOULSYNC_TEST_DB_READY'] = '1' diff --git a/tests/test_credentials_endpoints.py b/tests/test_credentials_endpoints.py index 575e3378..287fee5b 100644 --- a/tests/test_credentials_endpoints.py +++ b/tests/test_credentials_endpoints.py @@ -17,7 +17,7 @@ import tempfile import pytest # Redirect the DB before importing web_server so it never touches a real library. -_TMP = tempfile.mkdtemp(prefix='ss-cred-ep-') +_TMP = tempfile.mkdtemp(prefix='soulsync-testdb-cred-') os.environ['DATABASE_PATH'] = os.path.join(_TMP, 'creds_ep.db') os.environ['SOULSYNC_TEST_DB_READY'] = '1'