This is an automated email from the ASF dual-hosted git repository.

bugraoz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new ed10c596661 Add 31 missing airflowctl integration test commands 
(#58701)
ed10c596661 is described below

commit ed10c59666158879c19e1d61d4150085ab2d37ae
Author: Steve Ahn <[email protected]>
AuthorDate: Sat Nov 29 02:49:18 2025 -0800

    Add 31 missing airflowctl integration test commands (#58701)
    
    * Add 31 missing airflowctl integration test commands
    
    * fix integration test parameters
---
 .../tests/airflowctl_tests/conftest.py             | 44 +++++++++++++++++++++-
 .../airflowctl_tests/fixtures/pools_export.json    | 38 +++++++++++++++++++
 .../fixtures/test_connections.json                 | 11 ++++++
 .../airflowctl_tests/fixtures/test_pools.json      |  8 ++++
 .../airflowctl_tests/fixtures/test_variables.json  |  7 ++++
 .../fixtures/variables_export.json                 |  8 ++++
 6 files changed, 115 insertions(+), 1 deletion(-)

diff --git a/airflow-ctl-tests/tests/airflowctl_tests/conftest.py 
b/airflow-ctl-tests/tests/airflowctl_tests/conftest.py
index 163b4731551..e5ccff6c51d 100644
--- a/airflow-ctl-tests/tests/airflowctl_tests/conftest.py
+++ b/airflow-ctl-tests/tests/airflowctl_tests/conftest.py
@@ -241,19 +241,61 @@ def test_commands(login_command, date_param):
     # Define test commands to run with actual running API server
     return [
         login_command,
+        # Assets commands
+        "assets list",
+        # Backfill commands
         "backfill list",
+        # Config commands
         "config get --section core --option executor",
+        "config list",
+        "config lint",
+        # Connections commands
         "connections create --connection-id=test_con --conn-type=mysql 
--password=TEST_PASS -o json",
         "connections list",
         "connections list -o yaml",
-        "connections list -o tabledags list",
+        "connections list -o table",
+        "connections get --conn-id=test_con",
+        "connections get --conn-id=test_con -o json",
+        "connections update --connection-id=test_con --conn-type=postgres",
+        "connections import 
tests/airflowctl_tests/fixtures/test_connections.json",
+        "connections delete --conn-id=test_con",
+        "connections delete --conn-id=test_import_conn",
+        # DAGs commands
+        "dags list",
+        "dags get --dag-id=example_bash_operator",
+        "dags pause --dag-id=example_bash_operator",
+        "dags unpause --dag-id=example_bash_operator",
+        "dags update --dag-id=example_bash_operator --is-paused=false",
+        # DAG Run commands
         f"dagrun trigger --dag-id=example_bash_operator 
--logical-date={date_param} --run-after={date_param}",
         "dagrun list --dag-id example_bash_operator --state success --limit=1",
+        f"dagrun get --dag-id=example_bash_operator 
--dagrun-id=manual__{date_param}",
+        f"dagrun delete --dag-id=example_bash_operator 
--dagrun-id=manual__{date_param}",
+        # Jobs commands
         "jobs list",
+        # Pools commands
         "pools create --name=test_pool --slots=5",
         "pools list",
+        "pools get --pool-name=test_pool",
+        "pools get --pool-name=test_pool -o yaml",
+        "pools update --pool=test_pool --slots=10",
+        "pools import tests/airflowctl_tests/fixtures/test_pools.json",
+        "pools export tests/airflowctl_tests/fixtures/pools_export.json 
--output=json",
+        "pools delete --pool=test_pool",
+        "pools delete --pool=test_import_pool",
+        # Providers commands
         "providers list",
+        # Variables commands
         "variables create --key=test_key --value=test_value",
         "variables list",
+        "variables get --variable-key=test_key",
+        "variables get --variable-key=test_key -o table",
+        "variables update --key=test_key --value=updated_value",
+        "variables import tests/airflowctl_tests/fixtures/test_variables.json",
+        "variables export 
tests/airflowctl_tests/fixtures/variables_export.json",
+        "variables delete --variable-key=test_key",
+        "variables delete --variable-key=test_import_var",
+        "variables delete --variable-key=test_import_var_with_desc",
+        # Version command
         "version --remote",
     ]
diff --git 
a/airflow-ctl-tests/tests/airflowctl_tests/fixtures/pools_export.json 
b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/pools_export.json
new file mode 100644
index 00000000000..4752ad7801f
--- /dev/null
+++ b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/pools_export.json
@@ -0,0 +1,38 @@
+[
+    {
+        "deferred_slots": 0,
+        "description": "Default pool",
+        "include_deferred": false,
+        "name": "default_pool",
+        "occupied_slots": 0,
+        "open_slots": 128,
+        "queued_slots": 0,
+        "running_slots": 0,
+        "scheduled_slots": 0,
+        "slots": 128
+    },
+    {
+        "deferred_slots": 0,
+        "description": null,
+        "include_deferred": false,
+        "name": "test_pool",
+        "occupied_slots": 0,
+        "open_slots": 10,
+        "queued_slots": 0,
+        "running_slots": 0,
+        "scheduled_slots": 0,
+        "slots": 10
+    },
+    {
+        "deferred_slots": 0,
+        "description": "Test pool for import",
+        "include_deferred": false,
+        "name": "test_import_pool",
+        "occupied_slots": 0,
+        "open_slots": 10,
+        "queued_slots": 0,
+        "running_slots": 0,
+        "scheduled_slots": 0,
+        "slots": 10
+    }
+]
diff --git 
a/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_connections.json 
b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_connections.json
new file mode 100644
index 00000000000..0141f399ec2
--- /dev/null
+++ b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_connections.json
@@ -0,0 +1,11 @@
+{
+  "test_import_conn": {
+    "conn_type": "postgres",
+    "host": "localhost",
+    "login": "testuser",
+    "password": "testpass",
+    "port": 5432,
+    "extra": "{}",
+    "description": "Test connection for import"
+  }
+}
diff --git a/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_pools.json 
b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_pools.json
new file mode 100644
index 00000000000..691e1d62d56
--- /dev/null
+++ b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_pools.json
@@ -0,0 +1,8 @@
+[
+  {
+    "name": "test_import_pool",
+    "slots": 10,
+    "description": "Test pool for import",
+    "include_deferred": false
+  }
+]
diff --git 
a/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_variables.json 
b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_variables.json
new file mode 100644
index 00000000000..05de7d2fc8b
--- /dev/null
+++ b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/test_variables.json
@@ -0,0 +1,7 @@
+{
+  "test_import_var": "import_value",
+  "test_import_var_with_desc": {
+    "value": "import_value_with_description",
+    "description": "Test variable with description"
+  }
+}
diff --git 
a/airflow-ctl-tests/tests/airflowctl_tests/fixtures/variables_export.json 
b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/variables_export.json
new file mode 100644
index 00000000000..f8aed8ce379
--- /dev/null
+++ b/airflow-ctl-tests/tests/airflowctl_tests/fixtures/variables_export.json
@@ -0,0 +1,8 @@
+{
+    "test_import_var": "import_value",
+    "test_import_var_with_desc": {
+        "description": "Test variable with description",
+        "value": "import_value_with_description"
+    },
+    "test_key": "updated_value"
+}

Reply via email to