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
29d62b1f
Verified
Commit
29d62b1f
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update unit test for iptrunk termination
parent
d8d43e1a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!96
Make use of new callback step for external provisioning
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/workflows/iptrunk/test_terminate_iptrunk.py
+4
-25
4 additions, 25 deletions
test/workflows/iptrunk/test_terminate_iptrunk.py
with
4 additions
and
25 deletions
test/workflows/iptrunk/test_terminate_iptrunk.py
+
4
−
25
View file @
29d62b1f
...
...
@@ -4,14 +4,7 @@ import pytest
from
gso.products
import
Iptrunk
from
test.services.conftest
import
MockedNetboxClient
from
test.workflows
import
(
assert_complete
,
assert_suspended
,
extract_state
,
resume_workflow
,
run_workflow
,
user_accept_and_assert_suspended
,
)
from
test.workflows
import
assert_complete
,
assert_pp_interaction_success
,
extract_state
,
run_workflow
@pytest.mark.workflow
...
...
@@ -28,6 +21,7 @@ def test_successful_iptrunk_termination(
mock_provision_ip_trunk
,
iptrunk_subscription_factory
,
faker
,
data_config_filename
,
):
# Set up mock return values
product_id
=
iptrunk_subscription_factory
()
...
...
@@ -41,24 +35,9 @@ def test_successful_iptrunk_termination(
{
"
tt_number
"
:
faker
.
tt_number
(),
"
remove_configuration
"
:
True
,
"
clean_up_ipam
"
:
True
},
]
result
,
process_stat
,
step_log
=
run_workflow
(
"
terminate_iptrunk
"
,
initial_iptrunk_data
)
assert_suspended
(
result
)
lso_return
=
{
"
pp_run_results
"
:
{
"
status
"
:
"
ok
"
,
"
job_id
"
:
faker
.
uuid4
(),
"
output
"
:
"
parsed_output
"
,
"
return_code
"
:
0
,
},
"
confirm
"
:
"
ACCEPTED
"
,
}
for
_
in
range
(
2
):
result
,
step_log
=
user_accept_and_assert_suspended
(
process_stat
,
step_log
,
lso_return
)
result
,
step_log
=
user_accept_and_assert_suspended
(
process_stat
,
step_log
,
[{},
{}])
result
,
step_log
=
user_accept_and_assert_suspended
(
process_stat
,
step_log
,
lso_return
)
result
,
step_log
=
resume_workflow
(
process_stat
,
step_log
,
[{},
{}])
for
_
in
range
(
3
):
result
,
step_log
=
assert_pp_interaction_success
(
result
,
process_stat
,
step_log
)
assert_complete
(
result
)
...
...
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