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
f0cdd4d0
Commit
f0cdd4d0
authored
4 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Add unit test for the terminate WF for Layer 2 Circuit.
parent
be83e040
No related branches found
Branches containing commit
Tags
2.0
Tags containing commit
1 merge request
!307
Feature/l2circuits
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
+19
-0
19 additions, 0 deletions
test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
with
19 additions
and
0 deletions
test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
0 → 100644
+
19
−
0
View file @
f0cdd4d0
import
pytest
from
gso.products
import
ProductName
from
gso.products.product_types.layer_2_circuit
import
Layer2Circuit
from
test.workflows
import
assert_complete
,
extract_state
,
run_workflow
@pytest.mark.workflow
()
@pytest.mark.parametrize
(
"
layer_2_circuit_service_type
"
,
[
ProductName
.
GEANT_PLUS
,
ProductName
.
EXPRESSROUTE
])
def
test_terminate_layer_2_circuit
(
layer_2_circuit_service_type
,
layer_2_circuit_subscription_factory
,
faker
):
subscription_id
=
layer_2_circuit_subscription_factory
(
layer_2_circuit_service_type
=
layer_2_circuit_service_type
)
initialt_layer_2_circuit_data
=
[{
"
subscription_id
"
:
subscription_id
},
{
"
tt_number
"
:
faker
.
tt_number
()}]
result
,
_
,
_
=
run_workflow
(
"
terminate_layer_2_circuit
"
,
initialt_layer_2_circuit_data
)
assert_complete
(
result
)
state
=
extract_state
(
result
)
subscription_id
=
state
[
"
subscription_id
"
]
subscription
=
Layer2Circuit
.
from_subscription
(
subscription_id
)
assert
subscription
.
status
==
"
terminated
"
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