fix: update test fixtures for SQLite storage migration
Some checks failed
Lint & Test / test (push) Failing after 1m33s

All store tests were passing file paths instead of Database objects
after the JSON-to-SQLite migration. Updated fixtures to create temp
Database instances, rewrote backup e2e tests for binary .db format,
and fixed config tests for the simplified StorageConfig.
This commit is contained in:
2026-03-25 11:38:07 +03:00
parent 9dfd2365f4
commit 2da5c047f9
12 changed files with 135 additions and 126 deletions

View File

@@ -21,8 +21,7 @@ class TestDefaultConfig:
def test_default_storage_paths(self):
config = Config()
assert config.storage.devices_file == "data/devices.json"
assert config.storage.sync_clocks_file == "data/sync_clocks.json"
assert config.storage.database_file == "data/ledgrab.db"
def test_default_mqtt_disabled(self):
config = Config()
@@ -73,12 +72,11 @@ class TestServerConfig:
class TestDemoMode:
def test_demo_rewrites_storage_paths(self):
config = Config(demo=True)
assert config.storage.devices_file.startswith("data/demo/")
assert config.storage.sync_clocks_file.startswith("data/demo/")
assert config.storage.database_file.startswith("data/demo/")
def test_non_demo_keeps_original_paths(self):
config = Config(demo=False)
assert config.storage.devices_file == "data/devices.json"
assert config.storage.database_file == "data/ledgrab.db"
class TestGlobalConfig: