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
5dd8949c
Verified
Commit
5dd8949c
authored
8 months ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Update unit tests
parent
5303aaf5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!244
remove Kentik steps from router creation and termination workflows
Pipeline
#88212
canceled
8 months ago
Stage: tox
Stage: documentation
Stage: sonarqube
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/workflows/router/test_create_router.py
+0
-3
0 additions, 3 deletions
test/workflows/router/test_create_router.py
test/workflows/router/test_terminate_router.py
+0
-6
0 additions, 6 deletions
test/workflows/router/test_terminate_router.py
with
0 additions
and
9 deletions
test/workflows/router/test_create_router.py
+
0
−
3
View file @
5dd8949c
...
...
@@ -42,9 +42,7 @@ def router_creation_input_form_data(site_subscription_factory, faker):
@patch
(
"
gso.workflows.router.create_router.infoblox.find_host_by_fqdn
"
)
@patch
(
"
gso.workflows.router.create_router.infoblox.allocate_host
"
)
@patch
(
"
gso.workflows.router.create_router.SharePointClient
"
)
@patch
(
"
gso.workflows.router.create_router.KentikClient
"
)
def
test_create_nokia_router_success
(
mock_kentik_client
,
mock_sharepoint_client
,
mock_allocate_host
,
mock_find_host_by_fqdn
,
...
...
@@ -115,7 +113,6 @@ def test_create_nokia_router_success(
assert
mock_netbox_create_device
.
call_count
==
1
assert
mock_find_host_by_fqdn
.
call_count
==
1
assert
mock_sharepoint_client
.
call_count
==
1
assert
mock_kentik_client
.
call_count
==
1
assert
"
ipam_warning
"
not
in
state
...
...
This diff is collapsed.
Click to expand it.
test/workflows/router/test_terminate_router.py
+
0
−
6
View file @
5dd8949c
...
...
@@ -14,9 +14,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
@patch
(
"
gso.workflows.router.terminate_router.NetboxClient.delete_device
"
)
@patch
(
"
gso.workflows.router.terminate_router.infoblox.delete_host_by_ip
"
)
@patch
(
"
gso.workflows.router.terminate_router.LibreNMSClient.remove_device
"
)
@patch
(
"
gso.workflows.router.terminate_router.KentikClient
"
)
def
test_terminate_pe_router_full_success
(
mock_kentik_client
,
mock_librenms_remove_device
,
mock_delete_host_by_ip
,
mock_delete_device
,
...
...
@@ -56,7 +54,6 @@ def test_terminate_pe_router_full_success(
assert
mock_delete_device
.
call_count
==
1
assert
mock_delete_host_by_ip
.
call_count
==
1
assert
mock_librenms_remove_device
.
call_count
==
1
assert
mock_kentik_client
.
call_count
==
1
assert
mock_execute_playbook
.
call_count
==
lso_interaction_count
...
...
@@ -64,7 +61,6 @@ def test_terminate_pe_router_full_success(
@pytest.mark.parametrize
(
"
remove_configuration
"
,
[
True
,
False
])
@pytest.mark.parametrize
(
"
update_ibgp_mesh
"
,
[
True
,
False
])
@patch
(
"
gso.services.lso_client._send_request
"
)
@patch
(
"
gso.workflows.router.terminate_router.KentikClient
"
)
@patch
(
"
gso.workflows.router.terminate_router.NetboxClient.delete_device
"
)
@patch
(
"
gso.workflows.router.terminate_router.infoblox.delete_host_by_ip
"
)
@patch
(
"
gso.workflows.router.terminate_router.LibreNMSClient.remove_device
"
)
...
...
@@ -72,7 +68,6 @@ def test_terminate_p_router_full_success(
mock_librenms_remove_device
,
mock_delete_host_by_ip
,
mock_delete_device
,
mock_kentik_client
,
mock_execute_playbook
,
remove_configuration
,
update_ibgp_mesh
,
...
...
@@ -109,5 +104,4 @@ def test_terminate_p_router_full_success(
assert
mock_delete_device
.
call_count
==
1
assert
mock_delete_host_by_ip
.
call_count
==
1
assert
mock_librenms_remove_device
.
call_count
==
1
assert
mock_kentik_client
.
call_count
==
1
assert
mock_execute_playbook
.
call_count
==
lso_interaction_count
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