amoghrajesh commented on code in PR #29926:
URL: https://github.com/apache/airflow/pull/29926#discussion_r1189550840
##########
tests/www/views/test_views.py:
##########
@@ -62,6 +62,22 @@ def test_configuration_expose_config(admin_client):
check_content_in_response(["Airflow Configuration"], resp)
[email protected](os.environ, {"AIRFLOW__WEBSERVER__CONFIG_FILE":
"/tmp/my_custom_webserver_config.py"})
+def test_webserver_configuration_config_file(admin_client):
+ conf = initialize_config()
+ conf.validate()
+
+ assert WEBSERVER_CONFIG == os.path.join(AIRFLOW_HOME,
"webserver_config.py")
Review Comment:
I think the issue is that the `local_conf.get("webserver", "config_file")`
is unable to return the right value of the webserver config file here. This is
because the `mock.patch.dict` doesn't seem to add these values correctly for
the unit test. Could i get some help here @jedcunningham ?
##########
tests/www/views/test_views.py:
##########
@@ -62,6 +62,22 @@ def test_configuration_expose_config(admin_client):
check_content_in_response(["Airflow Configuration"], resp)
[email protected](os.environ, {"AIRFLOW__WEBSERVER__CONFIG_FILE":
"/tmp/my_custom_webserver_config.py"})
+def test_webserver_configuration_config_file(admin_client):
+ conf = initialize_config()
+ conf.validate()
+
+ assert WEBSERVER_CONFIG == os.path.join(AIRFLOW_HOME,
"webserver_config.py")
Review Comment:

##########
tests/www/views/test_views.py:
##########
@@ -62,6 +62,22 @@ def test_configuration_expose_config(admin_client):
check_content_in_response(["Airflow Configuration"], resp)
[email protected](os.environ, {"AIRFLOW__WEBSERVER__CONFIG_FILE":
"/tmp/my_custom_webserver_config.py"})
+def test_webserver_configuration_config_file(admin_client):
+ conf = initialize_config()
+ conf.validate()
+
+ assert WEBSERVER_CONFIG == os.path.join(AIRFLOW_HOME,
"webserver_config.py")
Review Comment:
Adding a log statement to print the env variable set and it seems to reflect
it there.
```
PASSED [100%][2023-05-10T14:10:06.620+0530] {test_views.py:68}
WARNING - /tmp/my_custom_webserver_config.py
```
--
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]