Skip to content
Snippets Groups Projects
Commit add072b0 authored by Neda Moeini's avatar Neda Moeini
Browse files

Update iptrunk unittest to test the config version is set correctly

parent 90659526
Branches
Tags
1 merge request!425Resolve #1048 "Service config backfilling"
Pipeline #94462 failed
...@@ -74,7 +74,7 @@ def input_form_wizard_data(request, router_subscription_factory, faker): ...@@ -74,7 +74,7 @@ def input_form_wizard_data(request, router_subscription_factory, faker):
"iptrunk_speed": PhysicalPortCapacity.HUNDRED_GIGABIT_PER_SECOND, "iptrunk_speed": PhysicalPortCapacity.HUNDRED_GIGABIT_PER_SECOND,
"iptrunk_number_of_members": 2, "iptrunk_number_of_members": 2,
"iptrunk_description_suffix": faker.word(), "iptrunk_description_suffix": faker.word(),
"iptrunk_config_version": "Version 1.0 - Base Version", "iptrunk_config_version": "1.0",
} }
create_ip_trunk_confirm_step = {"iptrunk_minimum_links": 1} create_ip_trunk_confirm_step = {"iptrunk_minimum_links": 1}
create_ip_trunk_side_a_router_name = {"side_a_node_id": router_side_a} create_ip_trunk_side_a_router_name = {"side_a_node_id": router_side_a}
...@@ -158,6 +158,7 @@ def test_successful_iptrunk_creation_with_standard_lso_result( ...@@ -158,6 +158,7 @@ def test_successful_iptrunk_creation_with_standard_lso_result(
f"{input_form_wizard_data[0]["iptrunk_description_suffix"]}, " f"{input_form_wizard_data[0]["iptrunk_description_suffix"]}, "
f"{subscription.iptrunk.gs_id}" f"{subscription.iptrunk.gs_id}"
) )
assert subscription.iptrunk.iptrunk_config_version == input_form_wizard_data[0]["iptrunk_config_version"]
# We search for 6 hosts in total, 2 in a /31 and 4 in a /126 # We search for 6 hosts in total, 2 in a /31 and 4 in a /126
assert mock_find_host_by_ip.call_count == 6 assert mock_find_host_by_ip.call_count == 6
......
...@@ -222,6 +222,7 @@ def test_iptrunk_modify_trunk_interface_success( ...@@ -222,6 +222,7 @@ def test_iptrunk_modify_trunk_interface_success(
assert subscription.iptrunk.iptrunk_minimum_links == input_form_iptrunk_data[1]["iptrunk_number_of_members"] - 1 assert subscription.iptrunk.iptrunk_minimum_links == input_form_iptrunk_data[1]["iptrunk_number_of_members"] - 1
assert subscription.iptrunk.iptrunk_sides[0].ga_id == new_side_a_gid assert subscription.iptrunk.iptrunk_sides[0].ga_id == new_side_a_gid
assert subscription.iptrunk.iptrunk_description_suffix == input_form_iptrunk_data[1]["iptrunk_description_suffix"] assert subscription.iptrunk.iptrunk_description_suffix == input_form_iptrunk_data[1]["iptrunk_description_suffix"]
assert subscription.iptrunk.iptrunk_config_version == input_form_iptrunk_data[0]["iptrunk_config_version"]
def _find_interface_by_name(interfaces: list[dict], name: str): def _find_interface_by_name(interfaces: list[dict], name: str):
for interface in interfaces: for interface in interfaces:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment