Update the tests - the label runner didn't use to update the metrics correctly
@@ -59,9 +59,11 @@ def test_kill_pod_APIcalling():
def test_kill_pod_SSHing():
label_runner = LabelRunner(NodeInventory(None), None, None, SSHExecutor())
- #Pactch action of switching to SSHing mode
+ # patch metrics collector
+ label_runner.metric_collector = MagicMock()
+
+ # Patch action of switching to SSHing mode
k8s_inventory = MagicMock()
- k8s_inventory.delete_pods = False
label_runner.k8s_inventory = k8s_inventory
# Patch action of getting nodes to execute kill command on
@@ -89,7 +91,10 @@ def test_kill_pod_SSHing():
def test_kill_pod_forced_SSHing():
label_runner = LabelRunner(NodeInventory(None), None, None, SSHExecutor())
- #Pactch action of switching to SSHing mode
+ # patch metrics collector
+ label_runner.metric_collector = MagicMock()
+
+ # Patch action of switching to SSHing mode
k8s_inventory = MagicMock()
k8s_inventory.delete_pods = False
label_runner.k8s_inventory = k8s_inventory
