You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/19 01:24:47 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #17700: Add error check for config_file parameter in GKEStartPodOperator

kaxil commented on a change in pull request #17700:
URL: https://github.com/apache/airflow/pull/17700#discussion_r691709121



##########
File path: tests/providers/google/cloud/operators/test_kubernetes_engine.py
##########
@@ -182,6 +182,19 @@ def test_execute(self, file_mock, mock_execute_in_subprocess, mock_gcp_hook, exe
 
         assert self.gke_op.config_file == FILE_NAME
 
+    def test_config_file_throws_error(self):
+        with pytest.raises(AirflowException):
+            GKEStartPodOperator(
+                project_id=TEST_GCP_PROJECT_ID,
+                location=PROJECT_LOCATION,
+                cluster_name=CLUSTER_NAME,
+                task_id=PROJECT_TASK_ID,
+                name=TASK_NAME,
+                namespace=NAMESPACE,
+                image=IMAGE,
+                config_file="/path/to/alternative/kubeconfig"

Review comment:
       ```suggestion
                   config_file="/path/to/alternative/kubeconfig",
   ```
   
   Should fix failing static checks: https://github.com/apache/airflow/pull/17700/checks?check_run_id=3366530442#step:10:185




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org