Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
51d51038
Commit
51d51038
authored
4 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Add more test for create VRF WF
parent
05cbe09a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!314
Feature/vrf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/workflows/vrf/test_create_vrf.py
+13
-0
13 additions, 0 deletions
test/workflows/vrf/test_create_vrf.py
with
13 additions
and
0 deletions
test/workflows/vrf/test_create_vrf.py
+
13
−
0
View file @
51d51038
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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment