jedcunningham commented on code in PR #29926:
URL: https://github.com/apache/airflow/pull/29926#discussion_r1146765657
##########
tests/www/views/test_views.py:
##########
@@ -62,6 +62,21 @@ def test_configuration_expose_config(admin_client):
check_content_in_response(["Airflow Configuration"], resp)
[email protected](os.environ, {"AIRFLOW__WEBSERVER__CONFIG_FILE":
"/tmp/webserver_config.py"})
Review Comment:
How about we use something other than `webserver_config.py`, so its more
obvious we are testing the arbitrary config path?
##########
tests/www/views/test_views.py:
##########
@@ -62,6 +62,21 @@ def test_configuration_expose_config(admin_client):
check_content_in_response(["Airflow Configuration"], resp)
[email protected](os.environ, {"AIRFLOW__WEBSERVER__CONFIG_FILE":
"/tmp/webserver_config.py"})
+def test_webserver_configuration_config_file(admin_client):
+ conf = initialize_config()
+ conf.validate()
+
+ assert WEBSERVER_CONFIG == os.path.join(get_airflow_home(),
"webserver_config.py")
+
+ config_path = os.path.join("/tmp", "webserver_config.py")
+
+ assert os.path.isfile(config_path)
Review Comment:
```suggestion
config_path = "/tmp/webserver_config.py"
assert WEBSERVER_CONFIG == config_path)
assert os.path.isfile(config_path)
```
Let's not use `get_airflow_home`, but otherwise feel free to take or leave
these suggestions.
--
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]