Description
We have a rule that every file in the providers directory should have tests. This is true in many cases, but there are minor exceptions.
https://github.com/apache/airflow/blob/master/tests/test_project_structure.py#L29-L50
tests/providers/amazon/aws/hooks/test_athena.pytests/providers/apache/cassandra/sensors/test_record.pytests/providers/apache/cassandra/sensors/test_table.pytests/providers/apache/hdfs/sensors/test_web_hdfs.pytests/providers/apache/hive/operators/test_vertica_to_hive.pytests/providers/apache/pig/operators/test_pig.pytests/providers/apache/spark/hooks/test_spark_jdbc_script.pytests/providers/cncf/kubernetes/operators/test_kubernetes_pod.pytests/providers/google/cloud/operators/test_datastore.pytests/providers/google/cloud/operators/test_sql_to_gcs.pytests/providers/google/cloud/sensors/test_bigquery.pytests/providers/google/cloud/utils/test_field_sanitizer.pytests/providers/google/cloud/utils/test_field_validator.pytests/providers/google/cloud/utils/test_mlengine_operator_utils.pytests/providers/google/cloud/utils/test_mlengine_prediction_summary.pytests/providers/jenkins/hooks/test_jenkins.pytests/providers/microsoft/azure/sensors/test_azure_cosmos.pytests/providers/microsoft/mssql/hooks/test_mssql.pytests/providers/oracle/operators/test_oracle.pytests/providers/qubole/hooks/test_qubole.pytests/providers/samba/hooks/test_samba.pytests/providers/sqlite/operators/test_sqlite.pytests/providers/yandex/hooks/test_yandex.pyI would be happy if someone would complete the missing tests.
If you decide to finish this ticket you don't have to do all the work yourself. One PR can only deal with a single file and it's ok.
Are you wondering how to start contributing to this project? Start by reading our contributor guide
Use case / motivation
Raising test coverage facilitates refactoring and prevents regression.
For the contributor, this is an opportunity to learn more about the structure of the project and to learn better good practices in writing tests in Python.
Related Issues
N/A
If no one is working on the test_mssql.py, I can take work it.
tests/providers/microsoft/mssql/hooks/test_mssql.py
Added tests for Yandex hook
Added unit test for jenkins hook
https://github.com/apache/airflow/pull/9767
I've picked Cassandra table and record sensors hook. (primarily because, I 鉂わ笍 Cassandra)
tests/providers/apache/cassandra/sensors/test_record.py
tests/providers/apache/cassandra/sensors/test_table.py
Picked tests/providers/apache/hdfs/sensors/test_web_hdfs.py
@rootcss Wouldn't you be willing to give some love for this ticket?
https://github.com/apache/airflow/issues/8189
@rootcss Wouldn't you be willing to give some love for this ticket?
8189
@mik-laj Here's some more 鉂わ笍 for Cassandra - https://github.com/apache/airflow/pull/9877
I'd like to tackle tests/providers/microsoft/azure/sensors/test_azure_cosmos.py
I'm picking the following tests:
@mik-laj MsSqlHook in airflow/providers/microsoft/mssql/hooks/mssql.py is deprecated. Do we still need to add tests for it?
@rootcss If someone is willing, they can add tests, but it is not necessary. I will be happy without tests for this module.
@rootcss As far as I know, Tomek is working on tests for Datastore.
@turbaszek Can you confirm that?
@rootcss As far as I know, Tomek is working on tests for Datastore.
@turbaszek Can you confirm that?
Sure. I've removed it from my list.
@mik-laj I think, rest of the tests have been picked already. We're close to close this issue :)
I've picked tests/providers/google/cloud/utils/test_mlengine_prediction_summary.py
The ticket has been completed :-D
Thanks to everyone who participated in this task.
More info: https://github.com/apache/airflow/pull/10799
:tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada: :tada:
馃憤
Most helpful comment
If no one is working on the test_mssql.py, I can take work it.
tests/providers/microsoft/mssql/hooks/test_mssql.py