Add integration tests for config sensitive masking in airflowctl#61105
Conversation
|
Some static checks fail |
airflow-ctl-tests/tests/airflowctl_tests/test_config_sensitive_masking.py
Outdated
Show resolved
Hide resolved
64b0f52 to
2410823
Compare
|
@bugraoz93 @potiuk Refactoring complete. I have cleaned up the code duplication by moving shared logic to conftest.py as suggested. I have verified that the end-to-end masking tests still pass and static checks are green Please merge this PR when you have a moment. |
9b71672 to
9bff783
Compare
bugraoz93
left a comment
There was a problem hiding this comment.
Looks good! Thanks! Rebased to see the CI then we can merge :)
|
This way, we prevented the test file from getting bigger and bigger for specific use cases. We will also be able to add more with a few lines |
bugraoz93
left a comment
There was a problem hiding this comment.
Have you run the integration test with breeze? I saw your test hasn't picked up by CI so I assume we should add something to somewhere else. This check gives confidence to our releases so we should ensure it rans. Could you please check? We are using pytest so I suspect pytest hasn't picked up because infra looks okay for command test and others
https://github.com/apache/airflow/actions/runs/21778855360/job/62840600175?pr=61105
airflow-ctl-tests/tests/airflowctl_tests/test_config_sensitive_masking.py
Outdated
Show resolved
Hide resolved
…scovery - Remove @pytest.mark.flaky decorator from test_config_sensitive_masking.py as suggested - Fix CI test discovery by changing hardcoded path in run_tests.py from 'test_airflowctl_commands.py' to 'airflowctl_tests' directory to allow pytest to discover all test files in the directory
…che#61105) * Add integration tests for config sensitive masking in airflowctl * Fix static check failures: Sort imports in test_config_sensitive_masking.py * Refactor integration tests to reduce duplication by moving shared logic to conftest.py * Fix static checks in conftest.py * Address PR review feedback: Remove flaky decorator and fix CI test discovery - Remove @pytest.mark.flaky decorator from test_config_sensitive_masking.py as suggested - Fix CI test discovery by changing hardcoded path in run_tests.py from 'test_airflowctl_commands.py' to 'airflowctl_tests' directory to allow pytest to discover all test files in the directory
…che#61105) * Add integration tests for config sensitive masking in airflowctl * Fix static check failures: Sort imports in test_config_sensitive_masking.py * Refactor integration tests to reduce duplication by moving shared logic to conftest.py * Fix static checks in conftest.py * Address PR review feedback: Remove flaky decorator and fix CI test discovery - Remove @pytest.mark.flaky decorator from test_config_sensitive_masking.py as suggested - Fix CI test discovery by changing hardcoded path in run_tests.py from 'test_airflowctl_commands.py' to 'airflowctl_tests' directory to allow pytest to discover all test files in the directory
…che#61105) * Add integration tests for config sensitive masking in airflowctl * Fix static check failures: Sort imports in test_config_sensitive_masking.py * Refactor integration tests to reduce duplication by moving shared logic to conftest.py * Fix static checks in conftest.py * Address PR review feedback: Remove flaky decorator and fix CI test discovery - Remove @pytest.mark.flaky decorator from test_config_sensitive_masking.py as suggested - Fix CI test discovery by changing hardcoded path in run_tests.py from 'test_airflowctl_commands.py' to 'airflowctl_tests' directory to allow pytest to discover all test files in the directory
Description
Added integration tests to verify sensitive config values are properly masked end-to-end when using airflowctl with actual Airflow API.
The Airflow API masks sensitive values (like
fernet_key,sql_alchemy_conn) as< hidden >. These integration tests confirm that airflowctl correctly preserves and displays those masked values in real scenarios.Changes
config listcommandconfig getforfernet_keyconfig getforsql_alchemy_conn< hidden >appears in output for sensitive configsRelated PRs
Related Issue
Closes #59843
Testing
# Run from airflow-ctl-tests directory pytest tests/airflowctl_tests/test_config_sensitive_masking.py -v