Loading tests/unit/test_eam_flows.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from open_exposure_gateway.api.camara.edge_application_management.vwip.router im ) from open_exposure_gateway.core.exceptions import DownstreamServiceException from open_exposure_gateway.domain.edge_application_management import ( AppInstanceStatusChangeCloudEvent, SRMDeployCommand, SRMTerminateCommand, SRMZone, Loading Loading @@ -182,6 +183,7 @@ class TestCreateAppInstanceFlow: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == "https://client.example.com/callback" assert str(cloud_event.data.appInstanceId) == instance_id assert cloud_event.data.status == "ready" Loading tests/unit/test_eam_service.py +9 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ from open_exposure_gateway.core.exceptions import ( NotImplementedException, ) from open_exposure_gateway.domain.edge_application_management import ( AppInstanceStatusChangeCloudEvent, SRMCapabilityRequirement, SRMCatalogPayload, SRMCatalogServiceSpecificationCreated, Loading Loading @@ -2703,6 +2704,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == registration.sink assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id Loading Loading @@ -2772,6 +2774,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id assert cloud_event.data.status == "unknown" Loading Loading @@ -2920,6 +2923,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == registration.sink assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id Loading Loading @@ -3124,5 +3128,9 @@ class TestHandleCompleted: await service.handle_completed(event) assert len(callback_delivery_port.delivered) == 2 statuses = {cloud_event.data.status for _, cloud_event in callback_delivery_port.delivered} statuses = { cloud_event.data.status for _, cloud_event in callback_delivery_port.delivered if isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) } assert statuses == {"ready", "failed"} Loading
tests/unit/test_eam_flows.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from open_exposure_gateway.api.camara.edge_application_management.vwip.router im ) from open_exposure_gateway.core.exceptions import DownstreamServiceException from open_exposure_gateway.domain.edge_application_management import ( AppInstanceStatusChangeCloudEvent, SRMDeployCommand, SRMTerminateCommand, SRMZone, Loading Loading @@ -182,6 +183,7 @@ class TestCreateAppInstanceFlow: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == "https://client.example.com/callback" assert str(cloud_event.data.appInstanceId) == instance_id assert cloud_event.data.status == "ready" Loading
tests/unit/test_eam_service.py +9 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ from open_exposure_gateway.core.exceptions import ( NotImplementedException, ) from open_exposure_gateway.domain.edge_application_management import ( AppInstanceStatusChangeCloudEvent, SRMCapabilityRequirement, SRMCatalogPayload, SRMCatalogServiceSpecificationCreated, Loading Loading @@ -2703,6 +2704,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == registration.sink assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id Loading Loading @@ -2772,6 +2774,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id assert cloud_event.data.status == "unknown" Loading Loading @@ -2920,6 +2923,7 @@ class TestHandleCompleted: assert len(callback_delivery_port.delivered) == 1 sink, cloud_event = callback_delivery_port.delivered[0] assert isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) assert sink == registration.sink assert cloud_event.data.appInstanceId == INSTANCE_ID assert cloud_event.data.appId == app_id Loading Loading @@ -3124,5 +3128,9 @@ class TestHandleCompleted: await service.handle_completed(event) assert len(callback_delivery_port.delivered) == 2 statuses = {cloud_event.data.status for _, cloud_event in callback_delivery_port.delivered} statuses = { cloud_event.data.status for _, cloud_event in callback_delivery_port.delivered if isinstance(cloud_event, AppInstanceStatusChangeCloudEvent) } assert statuses == {"ready", "failed"}