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
41071672
Verified
Commit
41071672
authored
4 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Split duplicate code into a new fixture
parent
69de1d55
No related branches found
No related tags found
1 merge request
!286
Add Edge Port, GÉANT IP and IAS products
Pipeline
#89881
failed
4 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/workflows/nren_l3_core_service/test_modify_nren_l3_core_service.py
+16
-43
16 additions, 43 deletions
.../nren_l3_core_service/test_modify_nren_l3_core_service.py
with
16 additions
and
43 deletions
test/workflows/nren_l3_core_service/test_modify_nren_l3_core_service.py
+
16
−
43
View file @
41071672
...
...
@@ -92,15 +92,10 @@ def test_modify_nren_l3_core_service_add_new_edge_port_success(
assert
len
(
subscription
.
nren_l3_core_service
.
nren_ap_list
)
==
3
@pytest.mark.parametrize
(
"
l3_core_service_type
"
,
[
NRENL3CoreServiceType
.
GEANT_IP
,
NRENL3CoreServiceType
.
IAS
])
@pytest.mark.workflow
()
def
test_modify_nren_l3_core_service_modify_edge_port_success
(
faker
,
nren_l3_core_service_subscription_factory
,
l3_core_service_type
):
subscription_id
=
nren_l3_core_service_subscription_factory
(
nren_l3_core_service_type
=
l3_core_service_type
)
subscription
=
NRENL3CoreService
.
from_subscription
(
subscription_id
)
new_sbp_data
=
[
{
@pytest.fixture
()
def
sbp_input_form_data
(
faker
):
def
_generate_form_data
():
return
{
"
geant_sid
"
:
faker
.
geant_sid
(),
"
is_tagged
"
:
True
,
"
vlan_id
"
:
faker
.
vlan_id
(),
...
...
@@ -131,41 +126,19 @@ def test_modify_nren_l3_core_service_modify_edge_port_success(
"
peer_address
"
:
faker
.
ipv6
(),
"
add_v6_multicast
"
:
True
,
},
},
{
"
geant_sid
"
:
faker
.
geant_sid
(),
"
is_tagged
"
:
True
,
"
vlan_id
"
:
faker
.
vlan_id
(),
"
ipv4_address
"
:
faker
.
ipv4
(),
"
ipv6_address
"
:
faker
.
ipv6
(),
"
custom_firewall_filters
"
:
True
,
"
v4_bgp_peer
"
:
{
"
bfd_enabled
"
:
True
,
"
bfd_interval
"
:
faker
.
pyint
(),
"
bfd_multiplier
"
:
faker
.
pyint
(),
"
has_custom_policies
"
:
True
,
"
authentication_key
"
:
faker
.
password
(),
"
multipath_enabled
"
:
True
,
"
send_default_route
"
:
True
,
"
is_passive
"
:
True
,
"
peer_address
"
:
faker
.
ipv4
(),
"
add_v4_multicast
"
:
True
,
},
"
v6_bgp_peer
"
:
{
"
bfd_enabled
"
:
True
,
"
bfd_interval
"
:
faker
.
pyint
(),
"
bfd_multiplier
"
:
faker
.
pyint
(),
"
has_custom_policies
"
:
True
,
"
authentication_key
"
:
faker
.
password
(),
"
multipath_enabled
"
:
True
,
"
send_default_route
"
:
True
,
"
is_passive
"
:
True
,
"
peer_address
"
:
faker
.
ipv6
(),
"
add_v6_multicast
"
:
True
,
},
},
]
}
return
_generate_form_data
@pytest.mark.parametrize
(
"
l3_core_service_type
"
,
[
NRENL3CoreServiceType
.
GEANT_IP
,
NRENL3CoreServiceType
.
IAS
])
@pytest.mark.workflow
()
def
test_modify_nren_l3_core_service_modify_edge_port_success
(
faker
,
nren_l3_core_service_subscription_factory
,
l3_core_service_type
,
sbp_input_form_data
):
subscription_id
=
nren_l3_core_service_subscription_factory
(
nren_l3_core_service_type
=
l3_core_service_type
)
subscription
=
NRENL3CoreService
.
from_subscription
(
subscription_id
)
new_sbp_data
=
[
sbp_input_form_data
(),
sbp_input_form_data
()]
input_form_data
=
[
{
"
subscription_id
"
:
subscription_id
},
{
...
...
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