ColtenOuO commented on code in PR #72484:
URL: https://github.com/apache/airflow/pull/72484#discussion_r3952239746
##########
airflow-core/tests/unit/cli/commands/test_connection_command.py:
##########
@@ -147,6 +147,32 @@ def
test_cli_connections_list_hide_sensitive_without_show_values_fails(self):
with pytest.raises(SystemExit, match="--hide-sensitive can only be
used with --show-values"):
connection_command.connections_list(args)
+ def test_cli_connections_list_warns_about_env_var_connections(self,
monkeypatch):
+ """An `AIRFLOW_CONN_*` environment variable should trigger a stderr
warning."""
+ # `setup_method`'s `add_default_connections_back=True` also seeds
`AIRFLOW_CONN_*`
+ # env vars for every default connection, so isolate this test from
that ambient state.
Review Comment:
```suggestion
# The module-level database cleanup fixture may seed default
`AIRFLOW_CONN_*`
# variables, so remove that ambient state before testing this specific
entry.
```
Agreed with Jarek. Maybe we can change it to this instead? (BTW, if I'm not
mistaken, this is module-scoped instead of session-scope (? )
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]