@@ -132,6 +132,7 @@ def test_update_agentpool_profile_preview_default_behavior(self):
132132 decorator .update_auto_scaler_properties_vms = Mock (return_value = agentpool )
133133 decorator .update_upgrade_strategy = Mock (return_value = agentpool )
134134 decorator .update_blue_green_upgrade_settings = Mock (return_value = agentpool )
135+ decorator .update_gpu_profile = Mock (return_value = agentpool )
135136
136137 # Act
137138 result = decorator .update_agentpool_profile_preview ()
@@ -154,6 +155,7 @@ def test_update_agentpool_profile_preview_default_behavior(self):
154155 decorator .update_auto_scaler_properties_vms .assert_called_once_with (agentpool )
155156 decorator .update_upgrade_strategy .assert_called_once_with (agentpool )
156157 decorator .update_blue_green_upgrade_settings .assert_called_once_with (agentpool )
158+ decorator .update_gpu_profile .assert_called_once_with (agentpool )
157159
158160 def test_update_agentpool_profile_preview_with_agentpools_parameter (self ):
159161 """Test update_agentpool_profile_preview with agentpools parameter."""
@@ -194,6 +196,7 @@ def test_update_agentpool_profile_preview_with_agentpools_parameter(self):
194196 decorator .update_auto_scaler_properties_vms = Mock (return_value = agentpool )
195197 decorator .update_upgrade_strategy = Mock (return_value = agentpool )
196198 decorator .update_blue_green_upgrade_settings = Mock (return_value = agentpool )
199+ decorator .update_gpu_profile = Mock (return_value = agentpool )
197200
198201 # Act
199202 result = decorator .update_agentpool_profile_preview (agentpools )
@@ -244,6 +247,7 @@ def test_update_agentpool_profile_preview_managed_system_mode(self):
244247 decorator .update_auto_scaler_properties_vms = Mock ()
245248 decorator .update_upgrade_strategy = Mock ()
246249 decorator .update_blue_green_upgrade_settings = Mock ()
250+ decorator .update_gpu_profile = Mock ()
247251
248252 # Act
249253 result = decorator .update_agentpool_profile_preview ()
@@ -272,6 +276,7 @@ def test_update_agentpool_profile_preview_managed_system_mode(self):
272276 decorator .update_auto_scaler_properties_vms .assert_not_called ()
273277 decorator .update_upgrade_strategy .assert_not_called ()
274278 decorator .update_blue_green_upgrade_settings .assert_not_called ()
279+ decorator .update_gpu_profile .assert_not_called ()
275280
276281 def test_update_agentpool_profile_preview_managed_system_mode_with_agentpools (self ):
277282 """Test update_agentpool_profile_preview with ManagedSystem mode and agentpools parameter."""
@@ -349,6 +354,7 @@ def test_update_agentpool_profile_preview_system_mode_regular_flow(self):
349354 decorator .update_auto_scaler_properties_vms = Mock (return_value = agentpool )
350355 decorator .update_upgrade_strategy = Mock (return_value = agentpool )
351356 decorator .update_blue_green_upgrade_settings = Mock (return_value = agentpool )
357+ decorator .update_gpu_profile = Mock (return_value = agentpool )
352358
353359 # Act
354360 result = decorator .update_agentpool_profile_preview ()
@@ -369,6 +375,7 @@ def test_update_agentpool_profile_preview_system_mode_regular_flow(self):
369375 decorator .update_auto_scaler_properties_vms .assert_called_once_with (agentpool )
370376 decorator .update_upgrade_strategy .assert_called_once_with (agentpool )
371377 decorator .update_blue_green_upgrade_settings .assert_called_once_with (agentpool )
378+ decorator .update_gpu_profile .assert_called_once_with (agentpool )
372379
373380 def test_update_agentpool_profile_preview_execution_order (self ):
374381 """Test that update methods are called in the correct order."""
@@ -414,6 +421,7 @@ def mock_method(pool):
414421 decorator .update_auto_scaler_properties_vms = create_mock_update_method ("update_auto_scaler_properties_vms" )
415422 decorator .update_upgrade_strategy = create_mock_update_method ("update_upgrade_strategy" )
416423 decorator .update_blue_green_upgrade_settings = create_mock_update_method ("update_blue_green_upgrade_settings" )
424+ decorator .update_gpu_profile = create_mock_update_method ("update_gpu_profile" )
417425
418426 # Act
419427 decorator .update_agentpool_profile_preview ()
@@ -430,7 +438,8 @@ def mock_method(pool):
430438 "update_localdns_profile" ,
431439 "update_auto_scaler_properties_vms" ,
432440 "update_upgrade_strategy" ,
433- "update_blue_green_upgrade_settings"
441+ "update_blue_green_upgrade_settings" ,
442+ "update_gpu_profile" ,
434443 ]
435444 self .assertEqual (call_order , expected_order )
436445
@@ -478,6 +487,7 @@ def track_and_return(pool):
478487 decorator .update_auto_scaler_properties_vms = create_tracking_mock ("update_auto_scaler_properties_vms" )
479488 decorator .update_upgrade_strategy = create_tracking_mock ("update_upgrade_strategy" )
480489 decorator .update_blue_green_upgrade_settings = create_tracking_mock ("update_blue_green_upgrade_settings" )
490+ decorator .update_gpu_profile = create_tracking_mock ("update_gpu_profile" )
481491
482492 # Act
483493 result = decorator .update_agentpool_profile_preview ()
@@ -540,7 +550,7 @@ def test_update_agentpool_profile_preview_mixed_modes_scenario(self):
540550 'update_network_profile' , 'update_artifact_streaming' ,
541551 'update_secure_boot' , 'update_vtpm' , 'update_os_sku' , 'update_fips_image' ,
542552 'update_ssh_access' , 'update_localdns_profile' , 'update_auto_scaler_properties_vms' ,
543- 'update_upgrade_strategy' , 'update_blue_green_upgrade_settings'
553+ 'update_upgrade_strategy' , 'update_blue_green_upgrade_settings' , 'update_gpu_profile'
544554 ]
545555
546556 for method_name in update_methods :
@@ -612,6 +622,7 @@ def test_update_agentpool_profile_preview_managed_cluster_mode(self):
612622 decorator .update_auto_scaler_properties_vms = Mock (return_value = agentpool )
613623 decorator .update_upgrade_strategy = Mock (return_value = agentpool )
614624 decorator .update_blue_green_upgrade_settings = Mock (return_value = agentpool )
625+ decorator .update_gpu_profile = Mock (return_value = agentpool )
615626
616627 # Act
617628 result = decorator .update_agentpool_profile_preview (agentpools )
0 commit comments