Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Test Case ID

Test Objective

Test Steps

Expected Outcome

Test Type

TC-001Validate loading config via AIRFLOW_CLI_ENVIRONMENT
  1. Set
`export
  1. export AIRFLOW_CLI_ENVIRONMENT=
dev`
  1. dev 
  2. Ensure
`~
  1. ~/airflow/dev.
json`
  1. json  exists
  2. Run
`airflowctl
  1. airflowctl auth login --username admin --
password`
  1. password . Write admin  and press enter.
  2. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
Config is loaded from
`~
~/airflow/dev.
json`
json , user is authenticated, Connections are listedPositive
TC-002Handle missing config file for specified environment
  1. Set export AIRFLOW_CLI_ENVIRONMENT=nonexistent 
  2. Ensure
`~
  1. ~/airflow/nonexistent.
json`
  1. json  doesn't exist
  2. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
Error:
`Configuration
Configuration file '~/airflow/nonexistent.json' not
found`
found Negative
TC-003Verify login with valid username and password using default environment
  1. Set
`AIRFLOW
  1. AIRFLOW_CLI_ENVIRONMENT=
default`
  1. production 
  2. Ensure
`~
  1. ~/airflow/default.
json`
  1. json  exists
  2. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  3. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
User is authenticated, Connection list is returnedPositive
TC-004Ensure login fails if --username or --password is missing
  1. Set env:
`AIRFLOW
  1. AIRFLOW_CLI_ENVIRONMENT=
default`
  1. production 
  2. Run
`airflowctl
  1. airflowctl auth login --username
admin`
  1. admin 
Error:
`
--password is
required`
required Negative
TC-005Reject login with invalid credentials
  1. Set env:
`AIRFLOW
  1. AIRFLOW_CLI_ENVIRONMENT=
default`
  1. default 
  2. Run
`airflowctl
  1. airflowctl auth login --username wrong --
password`
  1. password . Write wrongpass  and press
Error:
`Invalid credentials`
Invalid credentials Negative
TC-006RBAC prevents restricted user from accessing Connections
  1. Login as user with no Connections access
  2. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
Error
An error message like
`Permission denied`
Permission denied  or HTTP 403Negative
TC-007RBAC allows permitted user to access Connections
  1. Login as user with Connections access
  2. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
Connection
The connections list is returnedPositive
TC-008Handle API downtime gracefully
  1. Simulate API downtime (Turn Off API: No Response , Run in dev mode and make a changes in file: timeout )
  2. Ensure valid credentials are logged in before executing any commands.xxxx
  3. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
CLI shows
`API unreachable`
API unreachable  or an appropriate timeout errorEdge
TC-009Verify CLI triggers correct API endpoints
  1. Login with valid credentials
  2. Run
`airflowctl
  1. airflowctl connections
list`
  1. list 
  2. Check backend logs and ensure proper API endpoint is called
API logs show endpoint:
`GET
GET /api/v2/
connections`
connections Positive
TC-010Command Testing
  1. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  2. Write airflowctl -h  and recursively write all the help commands for group and action commands. 
  3. Test each command such as airflowctl connections list, create, delete, update  respectively
Ensure commands are working properlyPositive
TC-011Verify version
  1. Run airflowctl auth login --username admin --password . Write admin  and press enter.
  2. Write airflowctl -h  and recursively write all the help commands for group and action commands. 
  3. Run airflowctl version 
Proper airflowctl  and airflow  versions are listed.Positive