You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/02/26 22:42:52 UTC

[GitHub] [airflow] mik-laj commented on issue #14285: is_valid_plugin can no longer be used for unit testing plugins

mik-laj commented on issue #14285:
URL: https://github.com/apache/airflow/issues/14285#issuecomment-786934272


   @soggycactus  This feature doesn't really do much work, so I don't think it's too useful for the end-user. From my experience, I know that it is best to check such things from the user's perspective, because this is the way to detect most problems.
   This means that you can run the code below to check if your plugin loads correctly.
   ```pytthon
   with mock.patch.dict('os.environ',  AIRFLOW__CORE__PLUGINS_FOLDER='/tmp/plugins_dir'):
       assert 'metastore_browser' in subprocess.check_output(['airflow', 'plugins'], timeout=15):
   ```
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org