Skip to content

Commit 3c3b9e7

Browse files
committed
update test_update_agentpool_profile_preview.py
1 parent 7973fe2 commit 3c3b9e7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/aks-preview/azext_aks_preview/tests/latest/test_update_agentpool_profile_preview.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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()
@@ -431,6 +439,7 @@ def mock_method(pool):
431439
"update_auto_scaler_properties_vms",
432440
"update_upgrade_strategy",
433441
"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()

0 commit comments

Comments
 (0)