Loading src/srm/api/databus/dependencies.py +2 −0 Changes for src/srm/api/databus/dependencies.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ from srm.adapters.database.repos.runtime_inventory import ( SqlServiceOrderRepository, ) from srm.adapters.database.repos.topology import SqlZoneRepository from srm.adapters.databus.nats_connection_manager import NatsConnectionManager from srm.adapters.databus.nats_publisher import NatsPublisher from srm.adapters.federation_manager.fm_client import FederationManager from srm.application.command_handlers.deploy_service import DeployServiceCommandCoordinator from srm.application.command_handlers.federated_deploy_outcome import ( Loading tests/integration/test_databus_command_flow.py +7 −2 Changes for tests/integration/test_databus_command_flow.py: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ from srm.domain.models.topology.enums import ( ZoneKind, ZoneState, ) from tests.unit.fakes import FakeTransformationFunctionAdapter DEPLOY_SUBJECT = "command.srm.service.deploy" NETWORK_ACTIVATE_SUBJECT = "command.srm.network.capability.activate" Loading Loading @@ -407,7 +408,9 @@ async def test_service_deploy_command_flow_persists_runtime_rows_and_publishes_e await subscribe_to_subjects( databus_connection_manager, session_maker, ConfiguredControlPathRegistry({}), ConfiguredControlPathRegistry( {f"{DomainKind.COMPUTE.value}.primary": FakeTransformationFunctionAdapter()} ), publisher, fm_client, ) Loading Loading @@ -502,7 +505,9 @@ async def test_network_activation_command_flow_persists_runtime_rows_and_publish await subscribe_to_subjects( databus_connection_manager, session_maker, ConfiguredControlPathRegistry({}), ConfiguredControlPathRegistry( {f"{DomainKind.NETWORK.value}.primary": FakeTransformationFunctionAdapter()} ), publisher, fm_client, ) Loading tests/integration/test_databus_deploy_e2e.py +11 −0 Changes for tests/integration/test_databus_deploy_e2e.py: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ from typing import Any, cast from uuid import UUID import nats import pytest import pytest_asyncio from asgi_lifespan import LifespanManager from fastapi import FastAPI Loading @@ -24,6 +25,7 @@ from srm.adapters.database.repos.runtime_inventory import ( SqlServiceOrderRepository, ) from srm.adapters.database.repos.topology import SqlZoneRepository from srm.adapters.transformation_functions.registry import ConfiguredControlPathRegistry from srm.domain.models.canonical_parameters.compute import ( ComputeRequirements, ComputeResources, Loading @@ -47,6 +49,7 @@ from srm.domain.models.topology.enums import ( ZoneState, ) from tests.conftest import _as_asyncpg_url from tests.unit.fakes import FakeTransformationFunctionAdapter def _now() -> datetime: Loading Loading @@ -289,6 +292,7 @@ async def test_databus_deploy_federation_with_partner_ref_completes_end_to_end( postgres_container: PostgresContainer, raw_nats_client: Client, clean_db: None, monkeypatch: pytest.MonkeyPatch, ) -> None: operation_id = UUID("22222222-2222-3333-4444-555555555555") app_instance_id = UUID("9a3f1c22-0000-4000-8000-000000000102") Loading @@ -296,6 +300,13 @@ async def test_databus_deploy_federation_with_partner_ref_completes_end_to_end( zone_id = UUID("642f6105-7015-4af1-a4d1-e1ecb8437abd") domain_id = UUID("bbbbbbbb-0000-4000-8000-000000000111") capability_id = UUID("cccccccc-0000-4000-8000-000000000112") control_path_ref = f"k8s.{zone_id}.compute" monkeypatch.setattr( "srm.main.build_control_path_registry", lambda settings, factory: ConfiguredControlPathRegistry( {control_path_ref: FakeTransformationFunctionAdapter()} ), ) await _seed_topology( postgres_container, zone_id=zone_id, Loading tests/unit/test_deploy_service_use_case.py +1 −0 Changes for tests/unit/test_deploy_service_use_case.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1830,6 +1830,7 @@ async def test_complete_activates_workload_through_control_path_adapter() -> Non adapter=adapter, ) result = await use_case.accept(command) _stub_reload_created_instances(service_instances) await use_case.complete(command, result) assert len(adapter.requests) == 1 Loading Loading
src/srm/api/databus/dependencies.py +2 −0 Changes for src/srm/api/databus/dependencies.py: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -11,6 +11,8 @@ from srm.adapters.database.repos.runtime_inventory import ( SqlServiceOrderRepository, ) from srm.adapters.database.repos.topology import SqlZoneRepository from srm.adapters.databus.nats_connection_manager import NatsConnectionManager from srm.adapters.databus.nats_publisher import NatsPublisher from srm.adapters.federation_manager.fm_client import FederationManager from srm.application.command_handlers.deploy_service import DeployServiceCommandCoordinator from srm.application.command_handlers.federated_deploy_outcome import ( Loading
tests/integration/test_databus_command_flow.py +7 −2 Changes for tests/integration/test_databus_command_flow.py: 7 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ from srm.domain.models.topology.enums import ( ZoneKind, ZoneState, ) from tests.unit.fakes import FakeTransformationFunctionAdapter DEPLOY_SUBJECT = "command.srm.service.deploy" NETWORK_ACTIVATE_SUBJECT = "command.srm.network.capability.activate" Loading Loading @@ -407,7 +408,9 @@ async def test_service_deploy_command_flow_persists_runtime_rows_and_publishes_e await subscribe_to_subjects( databus_connection_manager, session_maker, ConfiguredControlPathRegistry({}), ConfiguredControlPathRegistry( {f"{DomainKind.COMPUTE.value}.primary": FakeTransformationFunctionAdapter()} ), publisher, fm_client, ) Loading Loading @@ -502,7 +505,9 @@ async def test_network_activation_command_flow_persists_runtime_rows_and_publish await subscribe_to_subjects( databus_connection_manager, session_maker, ConfiguredControlPathRegistry({}), ConfiguredControlPathRegistry( {f"{DomainKind.NETWORK.value}.primary": FakeTransformationFunctionAdapter()} ), publisher, fm_client, ) Loading
tests/integration/test_databus_deploy_e2e.py +11 −0 Changes for tests/integration/test_databus_deploy_e2e.py: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ from typing import Any, cast from uuid import UUID import nats import pytest import pytest_asyncio from asgi_lifespan import LifespanManager from fastapi import FastAPI Loading @@ -24,6 +25,7 @@ from srm.adapters.database.repos.runtime_inventory import ( SqlServiceOrderRepository, ) from srm.adapters.database.repos.topology import SqlZoneRepository from srm.adapters.transformation_functions.registry import ConfiguredControlPathRegistry from srm.domain.models.canonical_parameters.compute import ( ComputeRequirements, ComputeResources, Loading @@ -47,6 +49,7 @@ from srm.domain.models.topology.enums import ( ZoneState, ) from tests.conftest import _as_asyncpg_url from tests.unit.fakes import FakeTransformationFunctionAdapter def _now() -> datetime: Loading Loading @@ -289,6 +292,7 @@ async def test_databus_deploy_federation_with_partner_ref_completes_end_to_end( postgres_container: PostgresContainer, raw_nats_client: Client, clean_db: None, monkeypatch: pytest.MonkeyPatch, ) -> None: operation_id = UUID("22222222-2222-3333-4444-555555555555") app_instance_id = UUID("9a3f1c22-0000-4000-8000-000000000102") Loading @@ -296,6 +300,13 @@ async def test_databus_deploy_federation_with_partner_ref_completes_end_to_end( zone_id = UUID("642f6105-7015-4af1-a4d1-e1ecb8437abd") domain_id = UUID("bbbbbbbb-0000-4000-8000-000000000111") capability_id = UUID("cccccccc-0000-4000-8000-000000000112") control_path_ref = f"k8s.{zone_id}.compute" monkeypatch.setattr( "srm.main.build_control_path_registry", lambda settings, factory: ConfiguredControlPathRegistry( {control_path_ref: FakeTransformationFunctionAdapter()} ), ) await _seed_topology( postgres_container, zone_id=zone_id, Loading
tests/unit/test_deploy_service_use_case.py +1 −0 Changes for tests/unit/test_deploy_service_use_case.py: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1830,6 +1830,7 @@ async def test_complete_activates_workload_through_control_path_adapter() -> Non adapter=adapter, ) result = await use_case.accept(command) _stub_reload_created_instances(service_instances) await use_case.complete(command, result) assert len(adapter.requests) == 1 Loading