@@ -595,6 +595,14 @@ def test_complete_script_execution_with_netapp_interface_creation(
595
595
# The complex sample has 4 interfaces, so create_lif should be called 4 times
596
596
assert mock_netapp_manager_instance .create_lif .call_count == 4
597
597
598
+ # Verify route creation was called with correct parameters
599
+ mock_netapp_manager_instance .create_routes_for_project .assert_called_once ()
600
+ route_call_args = (
601
+ mock_netapp_manager_instance .create_routes_for_project .call_args
602
+ )
603
+ assert route_call_args [0 ][0 ] == "12345678123456789abc123456789012" # project_id
604
+ assert len (route_call_args [0 ][1 ]) == 4 # 4 interface configurations
605
+
598
606
# Verify output was printed
599
607
mock_print .assert_called_once ()
600
608
@@ -659,6 +667,14 @@ def test_script_execution_with_custom_netapp_config_path(
659
667
# Verify NetApp LIF creation was called (single sample has 2 interfaces)
660
668
assert mock_netapp_manager_instance .create_lif .call_count == 2
661
669
670
+ # Verify route creation was called with correct parameters
671
+ mock_netapp_manager_instance .create_routes_for_project .assert_called_once ()
672
+ route_call_args = (
673
+ mock_netapp_manager_instance .create_routes_for_project .call_args
674
+ )
675
+ assert route_call_args [0 ][0 ] == "12345678123456789abc123456789012" # project_id
676
+ assert len (route_call_args [0 ][1 ]) == 2 # 2 interface configurations
677
+
662
678
# Verify output was printed
663
679
mock_print .assert_called_once ()
664
680
@@ -791,6 +807,9 @@ def test_script_execution_with_empty_vm_results_skips_netapp_creation(
791
807
# Verify create_lif was NOT called (no interfaces to create)
792
808
mock_netapp_manager_instance .create_lif .assert_not_called ()
793
809
810
+ # Verify route creation was NOT called (no interfaces to create routes for)
811
+ mock_netapp_manager_instance .create_routes_for_project .assert_not_called ()
812
+
794
813
# Verify output was still printed (empty results)
795
814
mock_print .assert_called_once ()
796
815
@@ -874,6 +893,14 @@ def test_end_to_end_netapp_interface_creation_with_realistic_data(
874
893
call .args [1 ], "name"
875
894
) # Should have interface config with name attribute
876
895
896
+ # Verify route creation was called with correct parameters
897
+ mock_netapp_manager_instance .create_routes_for_project .assert_called_once ()
898
+ route_call_args = (
899
+ mock_netapp_manager_instance .create_routes_for_project .call_args
900
+ )
901
+ assert route_call_args [0 ][0 ] == project_id_normalized # project_id
902
+ assert len (route_call_args [0 ][1 ]) == 4 # 4 interface configurations
903
+
877
904
# Verify output was printed
878
905
mock_print .assert_called_once ()
879
906
printed_output = mock_print .call_args [0 ][0 ]
0 commit comments