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

@@ -30,13 +30,21 @@ def _make_app():
@pytest.fixture
def device_store(tmp_path):
return DeviceStore(tmp_path / "devices.json")
def _route_db(tmp_path):
from wled_controller.storage.database import Database
db = Database(tmp_path / "test.db")
yield db
db.close()
@pytest.fixture
def output_target_store(tmp_path):
return OutputTargetStore(str(tmp_path / "output_targets.json"))
def device_store(_route_db):
return DeviceStore(_route_db)
@pytest.fixture
def output_target_store(_route_db):
return OutputTargetStore(_route_db)
@pytest.fixture