
"""Tests for Sentinel monitoring persistence."""

from pathlib import Path
from sentinel.monitoring.store import MonitoringStore


def test_monitoring_store_starts_empty(tmp_path: Path) -> None:
    store = MonitoringStore(tmp_path / "monitoring.db")
    store.initialize()

    assert store.get_alarm_summary() == {
        "active": 0,
        "acknowledged": 0,
        "resolved": 0,
    }
    assert store.get_alarms() == []
    assert store.get_recent_events() == []
    assert store.get_users() == []


def test_group_alarm_rule_and_schedule_tables_exist(tmp_path: Path) -> None:
    store = MonitoringStore(tmp_path / "monitoring.db")
    store.initialize()

    assert store.get_groups() == []
    assert store.get_alarm_rules() == []
    assert store.get_alarm_schedules() == []
    assert store.get_equipment_group_map() == {}
