Fence and reconcile module lifecycle effects
This commit is contained in:
@@ -10,11 +10,18 @@ from govoplan_core.core.modules import (
|
||||
ModuleManifest,
|
||||
)
|
||||
from govoplan_core.core.registry import PlatformRegistry
|
||||
from govoplan_core.core.recovery import RecoveryCheckpoint, RecoveryOperation
|
||||
from govoplan_core.core.runtime_coordination import (
|
||||
DistributedLease,
|
||||
RuntimeIdentity,
|
||||
bind_process_runtime_identity,
|
||||
)
|
||||
from govoplan_core.core.workflows import (
|
||||
CAPABILITY_WORKFLOW_DEFINITION_CONTRIBUTIONS,
|
||||
WorkflowDefinitionContribution,
|
||||
)
|
||||
from govoplan_core.db.session import configure_database, reset_database
|
||||
from govoplan_core.db.base import Base
|
||||
from govoplan_core.db.session import configure_database, get_database, reset_database
|
||||
|
||||
|
||||
class _ContributionProvider:
|
||||
@@ -30,8 +37,28 @@ class _ContributionProvider:
|
||||
class WorkflowContributionLifecycleTests(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
configure_database("sqlite:///:memory:")
|
||||
database = get_database()
|
||||
Base.metadata.create_all(
|
||||
bind=database.engine,
|
||||
tables=[
|
||||
DistributedLease.__table__,
|
||||
RecoveryOperation.__table__,
|
||||
RecoveryCheckpoint.__table__,
|
||||
],
|
||||
)
|
||||
bind_process_runtime_identity(
|
||||
RuntimeIdentity(
|
||||
installation_id="test-installation",
|
||||
node_id="test-node",
|
||||
incarnation="test-incarnation",
|
||||
role="test",
|
||||
software_version="test",
|
||||
composition_hash="0" * 64,
|
||||
)
|
||||
)
|
||||
|
||||
def tearDown(self) -> None:
|
||||
bind_process_runtime_identity(None)
|
||||
reset_database(dispose=True)
|
||||
|
||||
def test_active_graph_change_reconciles_module_workflow_baselines(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user