From 847bde1be0f396158f11c22de31f15645907e32c Mon Sep 17 00:00:00 2001 From: xavierk Date: Mon, 28 Sep 2026 03:23:46 +0530 Subject: [PATCH] test: account for pending publication table --- src/fenris/store.py | 5 ++--- tests/test_collector_tracer.py | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fenris/store.py b/src/fenris/store.py index 64a64ab..1c70aa1 100644 --- a/src/fenris/store.py +++ b/src/fenris/store.py @@ -3,8 +3,7 @@ This module handles: - Store initialization with WAL mode - Schema versioning with PRAGMA user_version -- The six entities: samples, hour_observations, day_aggregates, - monitoring_periods, controller_segments, endurance_baseline +- Observation records, derived activity, publication state, and metadata """ import sqlite3 from pathlib import Path @@ -33,7 +32,7 @@ def get_store_path(config: dict) -> Path: def init_store(store_path: Path) -> sqlite3.Connection: """Initialize the observation store if not present. - Creates the database with WAL mode and all six entities. + Creates the observation schema, including private pending-publication storage. Returns a connection to the store. """ conn = sqlite3.connect(str(store_path)) diff --git a/tests/test_collector_tracer.py b/tests/test_collector_tracer.py index 85753eb..f41e385 100644 --- a/tests/test_collector_tracer.py +++ b/tests/test_collector_tracer.py @@ -232,7 +232,7 @@ def test_store_initialization(config_fixture: Dict[str, Any]): # Initialize store conn = init_store(store_path) - # Verify all six entities exist + # Verify the observation, derived-history, and metadata tables exist. cursor = conn.execute("SELECT name FROM sqlite_master WHERE type='table'") tables = {row[0] for row in cursor.fetchall()} @@ -249,6 +249,7 @@ def test_store_initialization(config_fixture: Dict[str, Any]): expected_tables.add("sqlite_sequence") expected_tables.add("store_metadata") expected_tables.add("local_days") + expected_tables.add("pending_publications") assert expected_tables == tables conn.close()