Skip to content

Commit 063e482

Browse files
authored
Add missing custom command in airflowctl integration tests (#64795)
* Simplify calls in airflowctl integration tests
1 parent 8b03304 commit 063e482

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def date_param():
5151
TEST_COMMANDS = [
5252
# Auth commands
5353
f"auth token {CREDENTIAL_SUFFIX}",
54+
"auth list-envs",
5455
# Assets commands
5556
"assets list",
5657
"assets get --asset-id=1",
@@ -168,9 +169,7 @@ def test_hardcoded_xcom_key_would_collide():
168169
)
169170
def test_airflowctl_commands(command: str, run_command):
170171
"""Test airflowctl commands using docker-compose environment."""
171-
env_vars = {"AIRFLOW_CLI_DEBUG_MODE": "true"}
172-
173-
run_command(command, env_vars, skip_login=True)
172+
run_command(command=command, env_vars={"AIRFLOW_CLI_DEBUG_MODE": "true"}, skip_login=True)
174173

175174

176175
@pytest.mark.parametrize(
@@ -180,9 +179,12 @@ def test_airflowctl_commands(command: str, run_command):
180179
)
181180
def test_airflowctl_commands_skip_keyring(command: str, api_token: str, run_command):
182181
"""Test airflowctl commands using docker-compose environment without using keyring."""
183-
env_vars = {}
184-
env_vars["AIRFLOW_CLI_TOKEN"] = api_token
185-
env_vars["AIRFLOW_CLI_DEBUG_MODE"] = "false"
186-
env_vars["AIRFLOW_CLI_ENVIRONMENT"] = "nokeyring"
187-
188-
run_command(command, env_vars, skip_login=True)
182+
run_command(
183+
command=command,
184+
env_vars={
185+
"AIRFLOW_CLI_TOKEN": api_token,
186+
"AIRFLOW_CLI_DEBUG_MODE": "false",
187+
"AIRFLOW_CLI_ENVIRONMENT": "nokeyring",
188+
},
189+
skip_login=True,
190+
)

0 commit comments

Comments
 (0)