fix: make RPM runtime portable on Tumbleweed
This commit is contained in:
@@ -52,6 +52,21 @@ class TestIsRoot:
|
||||
class TestEnableIdempotentMatrix:
|
||||
"""§8.6: Period-row idempotent matrix."""
|
||||
|
||||
def test_first_enable_creates_missing_store(self, store_path):
|
||||
"""A fresh package install has a store directory but no database yet."""
|
||||
args = MagicMock(now=False, store_path=store_path)
|
||||
|
||||
with patch("fenris.monitor.subprocess") as mock_sub:
|
||||
mock_sub.run.return_value = MagicMock(returncode=0)
|
||||
cmd_enable(args)
|
||||
|
||||
conn = init_store(store_path)
|
||||
row = conn.execute(
|
||||
"SELECT ended_at FROM monitoring_periods WHERE ended_at IS NULL"
|
||||
).fetchone()
|
||||
conn.close()
|
||||
assert row is not None
|
||||
|
||||
def test_first_opens_period(self, store_path):
|
||||
"""First-ever enable opens a period at the enable moment."""
|
||||
# Initialize store
|
||||
|
||||
Reference in New Issue
Block a user