Loading src/open_exposure_gateway/application/services/edge_application_management_service.py +8 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,14 @@ class EdgeApplicationManagementService: if app_registration is None: raise BadRequestException(message=f"App {request.appId} is not registered") for zone_id in request.edgeCloudZones: if await self._app_instance_repo.exists_in_zone( app_registration.app_registration_id, zone_id ): raise AlreadyExistsException( message=f"Application already instantiated in Edge Cloud Zone {zone_id}" ) operation_id, correlation_id, requested_at = self._new_operation_metadata(x_correlator) app_deployment_id = uuid4() app_instance_ids = [uuid4() for _ in request.edgeCloudZones] Loading tests/unit/test_eam_flows.py +10 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,16 @@ class TestCreateAppDeploymentFlow: (callback,) = list(callback_registration_repo.rows.values()) assert callback.sink == "https://client.example.com/callback" def test_duplicate_zone_in_existing_deployment_returns_409( self, api_client: TestClient ) -> None: api_client.post(f"{EAM_BASE}/deployments", json=CREATE_DEPLOYMENT_BODY) response = api_client.post(f"{EAM_BASE}/deployments", json=CREATE_DEPLOYMENT_BODY) assert response.status_code == 409 body = response.json() assert body["status"] == 409 assert body["code"] == "ALREADY_EXISTS" def test_srm_receives_a_valid_deploy_command_with_n_targets( self, api_client: TestClient, Loading Loading
src/open_exposure_gateway/application/services/edge_application_management_service.py +8 −0 Original line number Diff line number Diff line Loading @@ -466,6 +466,14 @@ class EdgeApplicationManagementService: if app_registration is None: raise BadRequestException(message=f"App {request.appId} is not registered") for zone_id in request.edgeCloudZones: if await self._app_instance_repo.exists_in_zone( app_registration.app_registration_id, zone_id ): raise AlreadyExistsException( message=f"Application already instantiated in Edge Cloud Zone {zone_id}" ) operation_id, correlation_id, requested_at = self._new_operation_metadata(x_correlator) app_deployment_id = uuid4() app_instance_ids = [uuid4() for _ in request.edgeCloudZones] Loading
tests/unit/test_eam_flows.py +10 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,16 @@ class TestCreateAppDeploymentFlow: (callback,) = list(callback_registration_repo.rows.values()) assert callback.sink == "https://client.example.com/callback" def test_duplicate_zone_in_existing_deployment_returns_409( self, api_client: TestClient ) -> None: api_client.post(f"{EAM_BASE}/deployments", json=CREATE_DEPLOYMENT_BODY) response = api_client.post(f"{EAM_BASE}/deployments", json=CREATE_DEPLOYMENT_BODY) assert response.status_code == 409 body = response.json() assert body["status"] == 409 assert body["code"] == "ALREADY_EXISTS" def test_srm_receives_a_valid_deploy_command_with_n_targets( self, api_client: TestClient, Loading