diff --git a/Changelog.md b/Changelog.md index a2140eb8b1387461a6a8879d8588c05f74a25651..6a3d59571f679a2cf9576d9b15d96af7022797a0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +## [2.35] - 2025-01-30 +- Fix a bug in the L3 Core Service validation workflow + ## [2.34] - 2025-01-27 - Update SharePoint list interaction for L3 Core Services - Update signature of helper methods that return Subscription objects diff --git a/gso/workflows/l3_core_service/validate_l3_core_service.py b/gso/workflows/l3_core_service/validate_l3_core_service.py index 9b6fdcf7dd8f943bf2614d398e3396159b938bf0..0b02e34f6695578755c7c167755d8837a4f9fe63 100644 --- a/gso/workflows/l3_core_service/validate_l3_core_service.py +++ b/gso/workflows/l3_core_service/validate_l3_core_service.py @@ -73,6 +73,7 @@ def validate_l3_core_service() -> StepList: begin >> store_process_subscription(Target.SYSTEM) >> unsync + >> build_fqdn_list >> anonymous_lso_interaction(validate_sbp_config) >> anonymous_lso_interaction(validate_bgp_peers) >> validate_dns_records diff --git a/setup.py b/setup.py index 5ef9fd24e8e765b93dafd99470d1fa7c6993156c..5ab81a4959d87cd3fa00d226da6003f86f633ee4 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import find_packages, setup setup( name="geant-service-orchestrator", - version="2.34", + version="2.35", author="GÉANT Orchestration and Automation Team", author_email="goat@geant.org", description="GÉANT Service Orchestrator", diff --git a/test/workflows/l3_core_service/test_validate_l3_core_service.py b/test/workflows/l3_core_service/test_validate_l3_core_service.py new file mode 100644 index 0000000000000000000000000000000000000000..9f226e11b8dcfb13f5c82e58b8035b3b694f14d1 --- /dev/null +++ b/test/workflows/l3_core_service/test_validate_l3_core_service.py @@ -0,0 +1,38 @@ +from unittest.mock import patch + +import pytest + +from gso.products.product_types.l3_core_service import L3CoreService, L3CoreServiceType +from test.workflows import assert_complete, assert_lso_success, extract_state, run_workflow + + +@pytest.mark.workflow() +@patch("gso.services.lso_client._send_request") +@pytest.mark.parametrize( + "l3_core_service_type", + [ + L3CoreServiceType.GEANT_IP, + L3CoreServiceType.IAS, + L3CoreServiceType.GWS, + L3CoreServiceType.LHCONE, + L3CoreServiceType.COPERNICUS, + ], +) +def test_validate_l3_core_service( + mock_lso_interaction, l3_core_service_subscription_factory, faker, l3_core_service_type +): + subscription_id = str( + l3_core_service_subscription_factory(l3_core_service_type=l3_core_service_type).subscription_id + ) + initial_l3_core_service_data = [{"subscription_id": subscription_id}] + result, process_stat, step_log = run_workflow("validate_l3_core_service", initial_l3_core_service_data) + result, step_log = assert_lso_success(result, process_stat, step_log) + result, _ = assert_lso_success(result, process_stat, step_log) + assert_complete(result) + + state = extract_state(result) + subscription_id = state["subscription_id"] + subscription = L3CoreService.from_subscription(subscription_id) + assert subscription.status == "active" + assert subscription.insync is True + assert mock_lso_interaction.call_count == 2