nav
nav copied to clipboard
Overhaul test suite with fixtures
This PR has an overarching goal of making the test suite easier to run locally, rather then requiring devs to run all tests inside a very specifically defined Docker container (which is NOT how the test suite is run on GitHub actions).
Goals:
- [ ] Rather than spin up all kinds of third party services as part of either tox or
conftest.py
, such as gunicorn, PostgreSQL, Xvfb, while expecting that these are available in the local environment, these services should be defined as test fixtures. Any test that depends on PostgreSQL should declare a dependency to this fixture, in order for it to be able to use PostgreSQL. - [ ] A PostgreSQL fixture should be able to work with an already setup PostgreSQL server (such as in GitHub Actions), or spin up its own using Docker, rather than relying on being run inside a very specific container environment.
- [ ] Once all tests are properly "fixturized", the separation of the "unit", "integration" and "functional" test suites into separate tox environments should go away. These test environments are essentially all the same, when it comes to Python dependencies, and are a source of a lot of redundancies that lead to time-consuming test runs.
Some of the changes herein would probably stand to be factored out into separate PRs, as there are many fixes to the existing test suite that are not dependent on the fixture changes made.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
Test results
9 files 9 suites 3m 33s :stopwatch: 2 070 tests 1 506 :heavy_check_mark: 13 :zzz: 114 :x: 437 :fire: 4 678 runs 3 547 :heavy_check_mark: 36 :zzz: 228 :x: 867 :fire:
For more details on these failures and errors, see this check.
Results for commit b8a3582d.
:recycle: This comment has been updated with latest results.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
Quality Gate passed
Issues
1 New issue
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code