fix: bootstrap user preferences without invalidating DWH cache
This commit is contained in:
@@ -31,6 +31,24 @@ def test_dwh_and_evidence_jobs_have_distinct_lock_names():
|
||||
assert _lock_name("demo", "dwh") != _lock_name("demo", "evidence")
|
||||
|
||||
|
||||
def test_session_storage_does_not_change_the_dwh_artifact_binding(tmp_path):
|
||||
from types import SimpleNamespace
|
||||
|
||||
def config(session_storage=None):
|
||||
payload = {"dwh": {"connection": {"database": "warehouse"}}}
|
||||
if session_storage is not None:
|
||||
payload["session_storage"] = session_storage
|
||||
cfg = SimpleNamespace(_workspace_id="demo", _config_source="test")
|
||||
cfg.model_dump = lambda **_kwargs: payload
|
||||
cfg.model_dump_json = lambda: json.dumps(payload, separators=(",", ":"))
|
||||
return cfg
|
||||
|
||||
without_session_storage = config()
|
||||
with_session_storage = config({"type": "postgres_direct", "connection": {"database": "sessions"}})
|
||||
|
||||
assert config_dwh_binding(without_session_storage) == config_dwh_binding(with_session_storage)
|
||||
|
||||
|
||||
def test_unowned_reads_fail_closed_without_creating_any_files(tmp_path):
|
||||
import pytest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user