tests: use soulsync-testdb- prefix in the web_server endpoint tests
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.
This commit is contained in:
parent
e5b30d6e63
commit
35ffc9f5e2
2 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@ import tempfile
|
||||||
|
|
||||||
import pytest
|
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['DATABASE_PATH'] = os.path.join(_TMP, 'gate.db')
|
||||||
os.environ['SOULSYNC_TEST_DB_READY'] = '1'
|
os.environ['SOULSYNC_TEST_DB_READY'] = '1'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import tempfile
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
# Redirect the DB before importing web_server so it never touches a real library.
|
# 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['DATABASE_PATH'] = os.path.join(_TMP, 'creds_ep.db')
|
||||||
os.environ['SOULSYNC_TEST_DB_READY'] = '1'
|
os.environ['SOULSYNC_TEST_DB_READY'] = '1'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue