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
b08cc489
Verified
Commit
b08cc489
authored
3 months ago
by
Aleksandr Kurbatov
Committed by
Karel van Klink
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Update test_validate_router to include P and PE roles
parent
3ebfdf2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!310
`validate_router` - change in P-BGP verb
Pipeline
#90557
failed
3 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/router/test_validate_router.py
+9
-11
9 additions, 11 deletions
test/workflows/router/test_validate_router.py
with
9 additions
and
11 deletions
test/workflows/router/test_validate_router.py
+
9
−
11
View file @
b08cc489
...
...
@@ -32,14 +32,15 @@ def test_validate_nokia_router_success(
mock_find_host_by_fqdn
,
router_subscription_factory
,
faker
,
data_config_filename
,
geant_partner
,
router_state
,
router_role
,
):
mock_validate_librenms_device
.
return_value
=
None
router_subscription_factory
(
router_role
=
RouterRole
.
P
)
router_subscription_factory
(
router_role
=
RouterRole
.
PE
)
mock_kentik_client
.
return_value
=
MockedKentikClient
# Run workflow
subscription_id
=
router_subscription_factory
(
status
=
router_state
)
subscription_id
=
router_subscription_factory
(
status
=
router_state
,
router_role
=
router_role
)
mock_fqdn
=
Router
.
from_subscription
(
subscription_id
).
router
.
router_fqdn
mock_v4
=
faker
.
ipv4
()
mock_find_host_by_fqdn
.
return_value
=
objects
.
HostRecord
(
...
...
@@ -64,7 +65,9 @@ def test_validate_nokia_router_success(
state
=
extract_state
(
result
)
subscription_id
=
state
[
"
subscription_id
"
]
for
_
in
range
(
2
):
lso_execution_count
=
2
if
router_role
==
RouterRole
.
P
else
3
for
_
in
range
(
lso_execution_count
):
result
,
step_log
=
assert_lso_success
(
result
,
process_stat
,
step_log
)
assert_complete
(
result
)
...
...
@@ -73,7 +76,7 @@ def test_validate_nokia_router_success(
subscription
=
Router
.
from_subscription
(
subscription_id
)
assert
subscription
.
status
==
router_state
assert
mock_execute_playbook
.
call_count
==
2
assert
mock_execute_playbook
.
call_count
==
lso_execution_count
assert
mock_find_host_by_fqdn
.
call_count
==
1
assert
mock_get_device_by_name
.
call_count
==
1
assert
mock_validate_librenms_device
.
call_count
==
1
...
...
@@ -81,12 +84,7 @@ def test_validate_nokia_router_success(
@pytest.mark.workflow
()
def
test_validate_juniper_router_success
(
router_subscription_factory
,
faker
,
data_config_filename
,
geant_partner
,
):
def
test_validate_juniper_router_success
(
router_subscription_factory
):
# Run workflow
subscription_id
=
router_subscription_factory
(
vendor
=
Vendor
.
JUNIPER
)
...
...
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