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
0f0aed20
Verified
Commit
0f0aed20
authored
9 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Update unit test for router validation
parent
349ca8d2
No related branches found
No related tags found
No related merge requests found
Pipeline
#88528
passed
9 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
+4
-0
4 additions, 0 deletions
test/workflows/router/test_validate_router.py
with
4 additions
and
0 deletions
test/workflows/router/test_validate_router.py
+
4
−
0
View file @
0f0aed20
...
@@ -4,6 +4,7 @@ import pytest
...
@@ -4,6 +4,7 @@ import pytest
from
infoblox_client
import
objects
from
infoblox_client
import
objects
from
gso.products.product_types.router
import
Router
from
gso.products.product_types.router
import
Router
from
test.services.conftest
import
MockedKentikClient
from
test.workflows
import
(
from
test.workflows
import
(
assert_complete
,
assert_complete
,
assert_lso_success
,
assert_lso_success
,
...
@@ -17,7 +18,9 @@ from test.workflows import (
...
@@ -17,7 +18,9 @@ from test.workflows import (
@patch
(
"
gso.services.lso_client.execute_playbook
"
)
@patch
(
"
gso.services.lso_client.execute_playbook
"
)
@patch
(
"
gso.services.netbox_client.NetboxClient.get_device_by_name
"
)
@patch
(
"
gso.services.netbox_client.NetboxClient.get_device_by_name
"
)
@patch
(
"
gso.services.librenms_client.LibreNMSClient.validate_device
"
)
@patch
(
"
gso.services.librenms_client.LibreNMSClient.validate_device
"
)
@patch
(
"
gso.services.kentik_client.KentikClient
"
)
def
test_validate_nokia_router_success
(
def
test_validate_nokia_router_success
(
mock_kentik_client
,
mock_validate_librenms_device
,
mock_validate_librenms_device
,
mock_get_device_by_name
,
mock_get_device_by_name
,
mock_execute_playbook
,
mock_execute_playbook
,
...
@@ -28,6 +31,7 @@ def test_validate_nokia_router_success(
...
@@ -28,6 +31,7 @@ def test_validate_nokia_router_success(
geant_partner
,
geant_partner
,
):
):
mock_validate_librenms_device
.
return_value
=
None
mock_validate_librenms_device
.
return_value
=
None
mock_kentik_client
.
return_value
=
MockedKentikClient
# Run workflow
# Run workflow
subscription_id
=
nokia_router_subscription_factory
()
subscription_id
=
nokia_router_subscription_factory
()
mock_fqdn
=
Router
.
from_subscription
(
subscription_id
).
router
.
router_fqdn
mock_fqdn
=
Router
.
from_subscription
(
subscription_id
).
router
.
router_fqdn
...
...
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