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
60355082
Commit
60355082
authored
1 year ago
by
Karel van Klink
Committed by
Neda Moeini
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
update iptrunk modification unit test
parent
c6288e2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!83
Clean up the repo a bit, and add some unit tests
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/workflows/iptrunk/test_modify_trunk_interface.py
+21
-7
21 additions, 7 deletions
test/workflows/iptrunk/test_modify_trunk_interface.py
with
21 additions
and
7 deletions
test/workflows/iptrunk/test_modify_trunk_interface.py
+
21
−
7
View file @
60355082
...
...
@@ -95,10 +95,24 @@ def test_iptrunk_modify_trunk_interface_success(
assert
subscription
.
iptrunk
.
iptrunk_type
==
new_type
assert
subscription
.
iptrunk
.
iptrunk_speed
==
new_speed
assert
subscription
.
iptrunk
.
iptrunk_minimum_links
==
new_link_count
# FIXME: update assertions below when IPtrunk model is updated
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_geant_a_sid == new_side_a_sid
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members == new_side_a_ae_members
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members_description == new_side_a_ae_descriptions
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_geant_a_sid == new_side_b_sid
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members == new_side_b_ae_members
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members_description == new_side_b_ae_descriptions
assert
subscription
.
iptrunk
.
iptrunk_sides
[
0
].
iptrunk_side_ae_geant_a_sid
==
new_side_a_sid
def
_find_interface_by_name
(
interfaces
:
list
[
dict
[
str
,
str
]],
name
:
str
):
for
interface
in
interfaces
:
if
interface
[
"
interface_name
"
]
==
name
:
return
interface
raise
IndexError
(
f
"
Interface
{
name
}
not found!
"
)
for
member
in
subscription
.
iptrunk
.
iptrunk_sides
[
0
].
iptrunk_side_ae_members
:
assert
(
member
.
interface_description
==
_find_interface_by_name
(
new_side_a_ae_members
,
member
.
interface_name
)[
"
interface_description
"
]
)
assert
subscription
.
iptrunk
.
iptrunk_sides
[
1
].
iptrunk_side_ae_geant_a_sid
==
new_side_b_sid
for
member
in
subscription
.
iptrunk
.
iptrunk_sides
[
1
].
iptrunk_side_ae_members
:
assert
(
member
.
interface_description
==
_find_interface_by_name
(
new_side_b_ae_members
,
member
.
interface_name
)[
"
interface_description
"
]
)
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