SameerMesiah97 commented on code in PR #77355:
URL: https://github.com/apache/airflow/pull/77355#discussion_r4670308248


##########
providers/snowflake/tests/unit/snowflake/operators/test_snowflake.py:
##########
@@ -981,6 +1004,28 @@ def test_get_job_status_reraises_non_404_http_error(self, 
mock_get_sql_api_query
         with pytest.raises(requests.exceptions.HTTPError):
             operator.get_job_status(["uuid1"], context={})
 
+    @pytest.mark.parametrize(
+        "statuses",
+        [
+            ["unknown"],
+            ["success", "unknown"],
+            ["running", "unknown"],
+            [],
+        ],
+    )
+    def test_get_job_status_rejects_unexpected_statuses(self, 
mock_get_sql_api_query_status, statuses):
+        operator = self._make_operator()
+        mock_get_sql_api_query_status.side_effect = [{"status": status} for 
status in statuses]
+
+        with pytest.raises(
+            RuntimeError,
+            match="Unexpected Snowflake SQL API|No Snowflake SQL API query 
statuses returned",

Review Comment:
   This suggestion has been added to the test. 



-- 
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