gpadavala commented on code in PR #46704:
URL: https://github.com/apache/airflow/pull/46704#discussion_r1983163356


##########
providers/databricks/tests/unit/databricks/plugins/test_databricks_workflow.py:
##########
@@ -87,6 +87,27 @@ def test_repair_task(mock_databricks_hook):
     mock_hook_instance.repair_run.assert_called_once()
 
 
+@patch("airflow.providers.databricks.plugins.databricks_workflow.DatabricksHook")
+def test_repair_task_with_params(mock_databricks_hook):
+    mock_hook_instance = mock_databricks_hook.return_value
+    mock_hook_instance.get_latest_repair_id.return_value = 100
+    mock_hook_instance.repair_run.return_value = 200
+    mock_hook_instance.get_run.return_value = {
+        "overriding_parameters": {
+            "key1": "value1",
+            "key2": "value2",
+        }
+    }
+
+    tasks_to_repair = ["task1", "task2"]
+    result = _repair_task(DATABRICKS_CONN_ID, DATABRICKS_RUN_ID, 
tasks_to_repair, LOG)
+
+    assert result == 200
+    
mock_hook_instance.get_latest_repair_id.assert_called_once_with(DATABRICKS_RUN_ID)
+    mock_hook_instance.get_run.assert_called_once_with(DATABRICKS_RUN_ID)
+    mock_hook_instance.repair_run.assert_called_once()

Review Comment:
   sorry been busy past 2 weeks, will get this updated and let you know



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to