Skip to content
Snippets Groups Projects
Commit 0b7ba4a3 authored by Neda Moeini's avatar Neda Moeini
Browse files

Add more test for create VRF WF

parent 9b93e981
No related branches found
No related tags found
No related merge requests found
Pipeline #90626 passed
This commit is part of merge request !314. Comments created here will be created in the context of that merge request.
import pytest import pytest
from orchestrator.types import SubscriptionLifecycle from orchestrator.types import SubscriptionLifecycle
from pydantic_forms.exceptions import FormValidationError
from gso.products import ProductName from gso.products import ProductName
from gso.products.product_types.vrf import VRF from gso.products.product_types.vrf import VRF
...@@ -40,3 +41,15 @@ def test_create_vrf_success( ...@@ -40,3 +41,15 @@ def test_create_vrf_success(
assert subscription.vrf.route_target == vrf_input[1]["route_target"] assert subscription.vrf.route_target == vrf_input[1]["route_target"]
assert subscription.vrf.vrf_as_number == vrf_input[1]["vrf_as_number"] assert subscription.vrf.vrf_as_number == vrf_input[1]["vrf_as_number"]
assert subscription.description == f"VRF {vrf_input[1]["vrf_name"]}" assert subscription.description == f"VRF {vrf_input[1]["vrf_name"]}"
@pytest.mark.workflow()
def test_create_vrf_with_duplicate_vrf_name(
vrf_input,
faker,
vrf_subscription_factory,
data_config_filename,
):
vrf_subscription_factory(vrf_name=vrf_input[1]["vrf_name"])
with pytest.raises(FormValidationError, match="VRF name must be unique."):
run_workflow("create_vrf", vrf_input)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment