kaxil commented on code in PR #47354:
URL: https://github.com/apache/airflow/pull/47354#discussion_r1995483869
##########
tests/cli/commands/remote_commands/test_config_command.py:
##########
@@ -254,6 +256,26 @@ def test_lint_detects_removed_configs(self,
removed_config):
assert normalized_message in normalized_output
+ @pytest.mark.parametrize(
+ "default_changed_config",
+ [config for config in config_command.CONFIGS_CHANGES if
config.default_change],
+ )
+ def test_lint_detects_default_changed_configs(self,
default_changed_config):
+ with mock.patch("airflow.configuration.conf.has_option",
return_value=True):
+ with contextlib.redirect_stdout(StringIO()) as temp_stdout:
+
config_command.lint_config(cli_parser.get_parser().parse_args(["config",
"lint"]))
+
+ output = temp_stdout.getvalue()
+
+ if default_changed_config.message is not None:
+ normalized_output = re.sub(r"\s+", " ", output.strip())
+ normalized_message = re.sub(r"\s+", " ",
default_changed_config.message.strip())
+
+ print("Normalized Message:", normalized_message)
+ print("Normalized Output:", normalized_output)
Review Comment:
```suggestion
```
--
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]