This is an automated email from the ASF dual-hosted git repository. bugraoz pushed a commit to branch bugfix/airflowctl-tests/catch-more-errors in repository https://gitbox.apache.org/repos/asf/airflow.git
commit fb59456a6944650cc0476d3f6975fd9aac7275b0 Author: bugraoz93 <[email protected]> AuthorDate: Wed Oct 22 01:46:04 2025 +0200 Caught if added commands is not an airflowctl command --- airflow-ctl-tests/tests/airflowctl_tests/conftest.py | 2 +- .../tests/airflowctl_tests/test_airflowctl_commands.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/airflow-ctl-tests/tests/airflowctl_tests/conftest.py b/airflow-ctl-tests/tests/airflowctl_tests/conftest.py index 720403e3c64..202f5d3ca4e 100644 --- a/airflow-ctl-tests/tests/airflowctl_tests/conftest.py +++ b/airflow-ctl-tests/tests/airflowctl_tests/conftest.py @@ -235,7 +235,7 @@ def test_commands(login_command, date_param): # Define test commands to run with actual running API server return [ login_command, - "backfill list", + "backfills list", "config get --section core --option executor", "connections create --connection-id=test_con --conn-type=mysql --password=TEST_PASS -o json", "connections list", diff --git a/airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py b/airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py index f41b2c1424f..d17e646cb06 100644 --- a/airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py +++ b/airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py @@ -63,7 +63,11 @@ def test_airflowctl_commands(login_command, login_output, test_commands): # This is a common error message that is thrown by client when something is wrong # Please ensure it is aligning with airflowctl.api.client.get_json_error airflowctl_client_server_response_error = "Server error" - if airflowctl_client_server_response_error in stdout_result: + airflowctl_command_error = "command error: argument GROUP_OR_COMMAND: invalid choice" + if ( + airflowctl_client_server_response_error in stdout_result + or airflowctl_command_error in stdout_result + ): console.print(f"[red]❌ Output contained unexpected text for command '{command_from_config}'") console.print(f"[red]Did not expect to find:\n{airflowctl_client_server_response_error}\n") console.print(f"[red]But got:\n{stdout_result}\n")
