Taragolis commented on code in PR #39768:
URL: https://github.com/apache/airflow/pull/39768#discussion_r1611065315


##########
tests/integration/providers/google/cloud/transfers/test_bigquery_to_mssql.py:
##########


Review Comment:
   > Also, test_bigquery_to_mssql.py was duplicated in the original path and in 
the providers' integration tests - I assume that by mistake or as a blueprint 
for the integration tests, but for now it's better be deleted to avoid 
confusion.
   
   It uses BigQueryToMsSqlOperator, which store into the 
[`airflow/providers/google/cloud/transfers/bigquery_to_mssql.py`](https://github.com/apache/airflow/tree/main/airflow/providers/google/cloud/transfers/bigquery_to_mssql.py),
 the naming pretty simple it expects to have unit test in module 
`tests/providers/google/cloud/transfers/test_bigquery_to_mssql.py`.
   
   So I'm not sure why we want to delete this file, because originally, before 
AIrflow 2.9 where Microsoft SQL Server backend this test run successfully, 
after that it never run. So we need to fix it by:
   1. Make it unit test, something tells me that it might used default test 
connection, which by default was Airflow DB for Microsoft SQL Server Backend
   2. Make it integration test, however we still need unit test. That mean 
Option 1 is more preferable.



##########
tests/providers/google/cloud/transfers/test_bigquery_to_sql.py:
##########
@@ -0,0 +1,29 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import pytest
+
+
[email protected](
+    reason="FIXME: this test exists to avoid Non-DB tests from failing due to 
a mistyped "
+    "path in test_project_structure. Remove this file in the next Airflow's 
version "
+    "after 2.9.1."
+)
+class TestBigqueryToSql:
+    pass

Review Comment:
   No idea what you try to achieve here, and what resolved in Airflow 2.9.1?
    
   There is no tests for the module 
[`airflow/providers/google/cloud/transfers/bigquery_to_sql.py`](https://github.com/apache/airflow/tree/main/airflow/providers/google/cloud/transfers/bigquery_to_sql.py)
 that why it listed in 
`tests/always/test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests`.
 We expect to have this test eventually: 
https://github.com/apache/airflow/issues/35442
   
   So better return back 
`tests/providers/google/cloud/transfers/test_bigquery_to_sql.py` in 
`tests/always/test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests`
 rather than placeholder 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