Skip to content
Snippets Groups Projects
Verified Commit d8d43e1a authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update trunk interface modification workflow unit test

parent 26659a98
No related branches found
No related tags found
1 merge request!96Make use of new callback step for external provisioning
This commit is part of merge request !96. Comments created here will be created in the context of that merge request.
......@@ -4,14 +4,7 @@ import pytest
from gso.products import Iptrunk
from gso.products.product_blocks.iptrunk import IptrunkType, PhyPortCapacity
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
from test.workflows.iptrunk.test_create_iptrunk import MockedNetboxClient
......@@ -33,6 +26,7 @@ def test_iptrunk_modify_trunk_interface_success(
mock_provision_ip_trunk,
iptrunk_subscription_factory,
faker,
data_config_filename,
):
# Set up mock return values
mocked_netbox = MockedNetboxClient()
......@@ -82,22 +76,9 @@ def test_iptrunk_modify_trunk_interface_success(
]
result, process_stat, step_log = run_workflow("modify_trunk_interface", 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",
}
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(2):
result, step_log = assert_pp_interaction_success(result, process_stat, step_log)
assert_complete(result)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment