diff --git a/gso/workflows/router/modify_connection_strategy.py b/gso/workflows/router/modify_connection_strategy.py index 3aacfc0a5bffabe9d74ff5be5195471c675b416a..bff6fdc78cf17dea34c55fffcd9f108220b1500d 100644 --- a/gso/workflows/router/modify_connection_strategy.py +++ b/gso/workflows/router/modify_connection_strategy.py @@ -13,7 +13,7 @@ from gso.utils.shared_enums import ConnectionStrategy def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator: - """Modify the connection strategy initial formruff format.""" + """Modify the connection strategy initial form.""" subscription = Router.from_subscription(subscription_id) current_connection_strategy = ( diff --git a/gso/workflows/router/validate_router.py b/gso/workflows/router/validate_router.py index eb5059ebdc9d8459d1ed7ac52953a573a14cc912..c81e82bafc7d27009e463c7e7d2dafebe92b381b 100644 --- a/gso/workflows/router/validate_router.py +++ b/gso/workflows/router/validate_router.py @@ -19,13 +19,13 @@ from gso.workflows.router.update_ibgp_mesh import add_p_to_mesh_dry TT_NUMBER_ZERO = "TT#0000000000000000" -def _seed_initial_state(subscription_id: UUIDstr) -> FormGenerator: - router = Router.from_subscription(subscription_id) +def _seed_initial_state() -> FormGenerator: - class EmptyForm(FormPage): - pass + class InputForm(FormPage): + subscription_id: UUIDstr - yield EmptyForm + user_input = yield InputForm + router = Router.from_subscription(user_input["subscription_id"]) return {"subscription": router, "tt_number": TT_NUMBER_ZERO} diff --git a/test/workflows/router/test_validate_router.py b/test/workflows/router/test_validate_router.py index c6610c743580947a4ade971a7b34ab68d3ae78d6..c8d6c61098ae93db76d0cc22146c63d1ada1bc32 100644 --- a/test/workflows/router/test_validate_router.py +++ b/test/workflows/router/test_validate_router.py @@ -15,7 +15,7 @@ from test.workflows import ( @pytest.mark.workflow() @pytest.mark.parametrize("product_id", ["nokia_router_subscription_factory", "juniper_router_subscription_factory"]) @patch("gso.services.infoblox.find_host_by_fqdn") -@patch("gso.workflows.router.validate_router.execute_playbook") +@patch("gso.services.lso_client.execute_playbook") def test_validate_router_success( mock_validate_router, mock_find_host_by_fqdn, @@ -23,9 +23,10 @@ def test_validate_router_success( faker, data_config_filename, request, + geant_partner, ): # Run workflow - subscription_id = request.getfixturevalue(product_id)() + subscription_id = request.getfixturevalue(product_id)(partner=geant_partner) mock_fqdn = Router.from_subscription(subscription_id).router.router_fqdn mock_v4 = faker.ipv4() mock_find_host_by_fqdn.return_value = objects.HostRecord(