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

Add more test for create VRF WF

parent 05cbe09a
No related branches found
No related tags found
1 merge request!314Feature/vrf
import pytest
from orchestrator.types import SubscriptionLifecycle
from pydantic_forms.exceptions import FormValidationError
from gso.products import ProductName
from gso.products.product_types.vrf import VRF
......@@ -40,3 +41,15 @@ def test_create_vrf_success(
assert subscription.vrf.route_target == vrf_input[1]["route_target"]
assert subscription.vrf.vrf_as_number == vrf_input[1]["vrf_as_number"]
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.
Finish editing this message first!
Please register or to comment