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
1910a3c7
Verified
Commit
1910a3c7
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update iptrunk modification unit test
parent
63f9ba4b
No related branches found
No related tags found
1 merge request
!84
Rework the IPtrunk model
Pipeline
#84223
passed
1 year ago
Stage: tox
Stage: documentation
Changes
1
Pipelines
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 @
1910a3c7
...
@@ -95,10 +95,24 @@ def test_iptrunk_modify_trunk_interface_success(
...
@@ -95,10 +95,24 @@ def test_iptrunk_modify_trunk_interface_success(
assert
subscription
.
iptrunk
.
iptrunk_type
==
new_type
assert
subscription
.
iptrunk
.
iptrunk_type
==
new_type
assert
subscription
.
iptrunk
.
iptrunk_speed
==
new_speed
assert
subscription
.
iptrunk
.
iptrunk_speed
==
new_speed
assert
subscription
.
iptrunk
.
iptrunk_minimum_links
==
new_link_count
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_geant_a_sid == new_side_a_sid
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members == new_side_a_ae_members
def
_find_interface_by_name
(
interfaces
:
list
[
dict
[
str
,
str
]],
name
:
str
):
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members_description == new_side_a_ae_descriptions
for
interface
in
interfaces
:
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_geant_a_sid == new_side_b_sid
if
interface
[
"
interface_name
"
]
==
name
:
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members == new_side_b_ae_members
return
interface
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members_description == new_side_b_ae_descriptions
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