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
Jira
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
add072b0
Commit
add072b0
authored
1 month ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Update iptrunk unittest to test the config version is set correctly
parent
90659526
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!425
Resolve #1048 "Service config backfilling"
Pipeline
#94462
failed
1 month ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/workflows/iptrunk/test_create_iptrunk.py
+2
-1
2 additions, 1 deletion
test/workflows/iptrunk/test_create_iptrunk.py
test/workflows/iptrunk/test_modify_trunk_interface.py
+1
-0
1 addition, 0 deletions
test/workflows/iptrunk/test_modify_trunk_interface.py
with
3 additions
and
1 deletion
test/workflows/iptrunk/test_create_iptrunk.py
+
2
−
1
View file @
add072b0
...
@@ -74,7 +74,7 @@ def input_form_wizard_data(request, router_subscription_factory, faker):
...
@@ -74,7 +74,7 @@ def input_form_wizard_data(request, router_subscription_factory, faker):
"
iptrunk_speed
"
:
PhysicalPortCapacity
.
HUNDRED_GIGABIT_PER_SECOND
,
"
iptrunk_speed
"
:
PhysicalPortCapacity
.
HUNDRED_GIGABIT_PER_SECOND
,
"
iptrunk_number_of_members
"
:
2
,
"
iptrunk_number_of_members
"
:
2
,
"
iptrunk_description_suffix
"
:
faker
.
word
(),
"
iptrunk_description_suffix
"
:
faker
.
word
(),
"
iptrunk_config_version
"
:
"
Version 1.0 - Base Version
"
,
"
iptrunk_config_version
"
:
"
1.0
"
,
}
}
create_ip_trunk_confirm_step
=
{
"
iptrunk_minimum_links
"
:
1
}
create_ip_trunk_confirm_step
=
{
"
iptrunk_minimum_links
"
:
1
}
create_ip_trunk_side_a_router_name
=
{
"
side_a_node_id
"
:
router_side_a
}
create_ip_trunk_side_a_router_name
=
{
"
side_a_node_id
"
:
router_side_a
}
...
@@ -158,6 +158,7 @@ def test_successful_iptrunk_creation_with_standard_lso_result(
...
@@ -158,6 +158,7 @@ def test_successful_iptrunk_creation_with_standard_lso_result(
f
"
{
input_form_wizard_data
[
0
][
"
iptrunk_description_suffix
"
]
}
,
"
f
"
{
input_form_wizard_data
[
0
][
"
iptrunk_description_suffix
"
]
}
,
"
f
"
{
subscription
.
iptrunk
.
gs_id
}
"
f
"
{
subscription
.
iptrunk
.
gs_id
}
"
)
)
assert
subscription
.
iptrunk
.
iptrunk_config_version
==
input_form_wizard_data
[
0
][
"
iptrunk_config_version
"
]
# We search for 6 hosts in total, 2 in a /31 and 4 in a /126
# We search for 6 hosts in total, 2 in a /31 and 4 in a /126
assert
mock_find_host_by_ip
.
call_count
==
6
assert
mock_find_host_by_ip
.
call_count
==
6
...
...
This diff is collapsed.
Click to expand it.
test/workflows/iptrunk/test_modify_trunk_interface.py
+
1
−
0
View file @
add072b0
...
@@ -222,6 +222,7 @@ def test_iptrunk_modify_trunk_interface_success(
...
@@ -222,6 +222,7 @@ def test_iptrunk_modify_trunk_interface_success(
assert
subscription
.
iptrunk
.
iptrunk_minimum_links
==
input_form_iptrunk_data
[
1
][
"
iptrunk_number_of_members
"
]
-
1
assert
subscription
.
iptrunk
.
iptrunk_minimum_links
==
input_form_iptrunk_data
[
1
][
"
iptrunk_number_of_members
"
]
-
1
assert
subscription
.
iptrunk
.
iptrunk_sides
[
0
].
ga_id
==
new_side_a_gid
assert
subscription
.
iptrunk
.
iptrunk_sides
[
0
].
ga_id
==
new_side_a_gid
assert
subscription
.
iptrunk
.
iptrunk_description_suffix
==
input_form_iptrunk_data
[
1
][
"
iptrunk_description_suffix
"
]
assert
subscription
.
iptrunk
.
iptrunk_description_suffix
==
input_form_iptrunk_data
[
1
][
"
iptrunk_description_suffix
"
]
assert
subscription
.
iptrunk
.
iptrunk_config_version
==
input_form_iptrunk_data
[
0
][
"
iptrunk_config_version
"
]
def
_find_interface_by_name
(
interfaces
:
list
[
dict
],
name
:
str
):
def
_find_interface_by_name
(
interfaces
:
list
[
dict
],
name
:
str
):
for
interface
in
interfaces
:
for
interface
in
interfaces
:
...
...
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