airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Resolve deprecations in `API` tests

Open boraberke opened this issue 8 months ago • 2 comments

This PR resolves internal warnings under tests/api_connexion.

Test Class Issue Resolution
TestGetConnection Encountered non-JSON in extra field Reformatted them as JSON
TestPatchConnection Encountered non-JSON in extra field Reformatted them as JSON
TestSetDagRunNote The experimental REST API is deprecated Removed this test. This test is already covered via another test test_with_auth_role_public_set
TestGetExtraLinks BigQueryExecuteQueryOperator has been deprecated Used CustomOperator instead
TestGetTaskInstancesBatch get_accessible_dag_ids has been deprecated Changed to get_auth_manager().get_permitted_dag_ids
TestConnectionSchema Encountered non-JSON in extra field Reformatted them as JSON

P.S. I was not sure if I needed to open a separate PR for the fix of TestGetTaskInstancesBatch, as it involves a change in the codebase. I included it here to address all API-related test deprecations at once. Let me know if I should separate it, and I will remove it from this PR and create a new one.

related: https://github.com/apache/airflow/issues/38642


^ Add meaningful description above Read the Pull Request Guidelines for more information. In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed. In case of a new dependency, check compliance with the ASF 3rd Party License Policy. In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

boraberke avatar Jun 14 '24 22:06 boraberke