potiuk edited a comment on issue #20453:
URL: https://github.com/apache/airflow/issues/20453#issuecomment-1008649769


   Have you tried to run `breeze` to run the tests? 
https://github.com/apache/airflow/blob/main/BREEZE.rst 
   
   Airflow has docker-compose based development environment that is the mirror 
of what is used in CI. Essentially it should be as easy as:
   
   ```
   ./breeze
   ```
   
   This should drop you (after a while of getting images and starting docker 
compose) into ./breeze shell (which is bash inside docler-compose airlfow 
image). Then immediately you should be able to run (you can auto-complete the 
tests with TAB):
   
   ```
   pytest test/providers/google/...
   ```
   
   and it should run the tests. The first time it will initialize the db and 
create all the necessary connections, Also while you are in the breeze shell 
you can run ``airflow db reset`` and it should reset the db, while ``airflow db 
init`` will fill the db with default connections. 
   
   By default it will use sqlite database, but you can also do (--db-reset is 
optional - the first ime you run it, the database should be "fresh", --db-reset 
is needed if you need to reset the DB from scratch):
   
   ```
   ./breeze --backend postgres --db-reset
   ```
   or
   
   ```
   ./breeze --backend mysql --db-reset
   ```
   
   or even:
   
   ```
   ./breeze --backend postgres --python 3.9 --db-reset
   ```
   
   If you need to run tests with a different python version.
   
   I hope it will be helpful
   
   


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


Reply via email to