This is an automated email from the ASF dual-hosted git repository. mobuchowski pushed a commit to branch fix-openlineage-tests in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 9b790301f76bd50d16e3b492e7bf76d1c7b826b1 Author: Maciej Obuchowski <[email protected]> AuthorDate: Thu Aug 3 23:10:01 2023 +0200 openlineage: remove eager test for auth headers, fix example dag Signed-off-by: Maciej Obuchowski <[email protected]> --- airflow/example_dags/plugins/event_listener.py | 6 +++--- tests/providers/openlineage/plugins/test_openlineage_adapter.py | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/airflow/example_dags/plugins/event_listener.py b/airflow/example_dags/plugins/event_listener.py index 2e2d01800b..16848c9ebc 100644 --- a/airflow/example_dags/plugins/event_listener.py +++ b/airflow/example_dags/plugins/event_listener.py @@ -111,7 +111,7 @@ def on_task_instance_failed(previous_state: TaskInstanceState, task_instance: Ta # [START howto_listen_dagrun_success_task] @hookimpl -def on_dag_run_success(dag_run: DagRun, message: str): +def on_dag_run_success(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to SUCCESS. """ @@ -126,7 +126,7 @@ def on_dag_run_success(dag_run: DagRun, message: str): # [START howto_listen_dagrun_failure_task] @hookimpl -def on_dag_run_failed(dag_run: DagRun, message: str): +def on_dag_run_failed(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to FAILED. """ @@ -142,7 +142,7 @@ def on_dag_run_failed(dag_run: DagRun, message: str): # [START howto_listen_dagrun_running_task] @hookimpl -def on_dag_run_running(dag_run: DagRun, message: str): +def on_dag_run_running(dag_run: DagRun, msg: str): """ This method is called when dag run state changes to RUNNING. """ diff --git a/tests/providers/openlineage/plugins/test_openlineage_adapter.py b/tests/providers/openlineage/plugins/test_openlineage_adapter.py index f81974a93e..b762d82800 100644 --- a/tests/providers/openlineage/plugins/test_openlineage_adapter.py +++ b/tests/providers/openlineage/plugins/test_openlineage_adapter.py @@ -43,7 +43,6 @@ def test_create_client_from_ol_env(): assert client.transport.url == "http://ol-api:5000" assert "Authorization" in client.transport.session.headers - assert client.transport.session.headers["Authorization"] == "Bearer api-key" @conf_vars( @@ -57,8 +56,6 @@ def test_create_client_from_config_with_options(): assert client.transport.kind == "http" assert client.transport.url == "http://ol-api:5000" - assert "Authorization" in client.transport.session.headers - assert client.transport.session.headers["Authorization"] == "Bearer api-key" @conf_vars(
