From c39e12266a9b7cc49e79a245baea5e7e51f762dd Mon Sep 17 00:00:00 2001 From: Bugra Ozturk Date: Sun, 14 Dec 2025 03:58:11 +0100 Subject: [PATCH] [v3-1-test] Add documentation for Airflow Ctl integration tests in contributing-docs (#59387) * Add documentation for Airflow Ctl integration tests in contributing-docs * Comment updates Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com> --------- (cherry picked from commit 93dfcde9446e3df637f57ef5560be8d517b88786) Co-authored-by: Bugra Ozturk Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com> --- contributing-docs/09_testing.rst | 3 ++ .../testing/airflow_ctl_tests.rst | 47 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 contributing-docs/testing/airflow_ctl_tests.rst diff --git a/contributing-docs/09_testing.rst b/contributing-docs/09_testing.rst index 6b6de6f5bcf2b..5b2905e2e8f00 100644 --- a/contributing-docs/09_testing.rst +++ b/contributing-docs/09_testing.rst @@ -47,6 +47,9 @@ includes: * `Task SDK integration tests `__ are specialized tests that verify the integration between the Apache Airflow Task SDK package and a running Airflow instance. +* `Airflow Ctl integration tests `__ are tests we run to verify + if the ``airflowctl`` command-line tool works correctly with a running Airflow instance. + You can also run other kinds of tests when you are developing Airflow packages: * `Testing distributions `__ is a document that describes how to diff --git a/contributing-docs/testing/airflow_ctl_tests.rst b/contributing-docs/testing/airflow_ctl_tests.rst new file mode 100644 index 0000000000000..64a8d436ad580 --- /dev/null +++ b/contributing-docs/testing/airflow_ctl_tests.rst @@ -0,0 +1,47 @@ + .. 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. + +Airflow Ctl (airflowctl) Tests +=============================== + +This document describes how to run tests for the Airflow Ctl (airflowctl) command-line tool. + +Similar to other integration tests, the Airflow Ctl tests are run in the Breeze environment. +The tests are using the `Docker Compose <../airflow-core/doc/howto/docker-compose/docker-compose.yaml>`__ and running a full working Airflow environment. +These tests run on a scheduled basis in CI and can also be run locally using Breeze. +We have them to ensure the ``airflowctl`` tool is working as expected and interacting with Airflow instances correctly. +Airflow Ctl integration tests are located in the root directory of Apache Airflow project. + +.. note:: + + The integration tests ensure that the ``airflowctl`` tool behaves as expected when interacting with Airflow instances. + They validate the tool's functionality in a controlled environment, providing confidence in its reliability. + +Running Airflow Ctl Tests with Breeze +------------------------------------- + +Firstly, checkout the tag or branch you want to run the tests on. +Then, you can run the tests using the following command: + +.. code-block:: bash + + breeze testing airflow-ctl-integration-test + +.. note:: + + The above command runs the integration tests for ``airflowctl`` in the Breeze environment. + Ensure that the correct tag or branch is checked out before executing the tests.