Closed kuaka closed 3 years ago
perhaps an alternative is to run the tests using the local docker-compose which would also test the database setup/ build
I built docker-compose-tests.yml but it seems that it is not affected by changing in local, isn't it? Which compose would be better to test in local without db? docker-compose-dev-local.yml?
sorry I don't understand the question. If you try to run the tests in docker-compose-tests.yml (sudo docker-compose -f docker-compose-tests.yml run --rm tests test) this should be failing. (as per the GitHub action). I'm not sure what you mean by "changing in local". The code base is the same. It won't be affected by modifications to other docker-compose files obviously.
I can see that it is now passing. Great
@biuti hopefully you got an automated email.
The merged code in development is causing the application to fail in the test setup. https://github.com/FAI-CIVL/FAI-Airscore/runs/1418466240?check_suite_focus=true
This is because we are trying to hit the database on app start up (by importing forms that are running queries) Please fix. As we are not using a database for the unit tests, you will need to isolate this code. either use a logical statement to decide if to hit the db (example here: https://github.com/FAI-CIVL/FAI-Airscore/blob/b5e7d5044eb4146ab6bd51d95a5816093fef4b8a/airscore/app.py#L43-L45) or move your import to where it is needed and not the top of the main views file. We need the unit tests to run.