ashb commented on a change in pull request #4601: [AIRFLOW-3758] Fix circular
import in WasbTaskHandler
URL: https://github.com/apache/airflow/pull/4601#discussion_r259773933
##########
File path: tests/test_logging_config.py
##########
@@ -251,6 +251,14 @@ def test_1_9_config(self):
finally:
conf.remove_option('core', 'task_log_reader', remove_default=False)
+ def test_loading_remote_logging_with_wasb_handler(self):
+ """Test if logging can be configured successfully for Azure Blob
Storage"""
+ from airflow.logging_config import configure_logging
+ conf.set('core', 'remote_logging', 'True')
+ conf.set('core', 'remote_log_conn_id', 'some_wasb')
+ conf.set('core', 'remote_base_log_folder', 'wasb://some-folder')
+ configure_logging()
Review comment:
I know we were just testing that it loaded without error, but it always
feels a bit odd to not see any assertions in a test.
How about we add something like
```python
import airflow.utils.log.wasb_task_handler.WasbTaskHandler
logger = logging.getLogger('airflow.task.x')
self.assertIsInstance(logger.handlers[0],
airflow.utils.log.wasb_task_handler.WasbTaskHandler)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services