There are still some areas of code that weren't covered.
As a first step we could investigate these areas and then by investigation result, start working on tests to cover it.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Update the logic to run code coverage | operations/software/thumbor-plugins | master | +24 -14 |
Event Timeline
@pwangai and I have been reviewing the code coverage. We found we could run coverage run -m pytest || coverage html where you can see line-by-line code coverage.
The areas we seem to be missing code coverage:
- PoolCounter (https://wikitech.wikimedia.org/wiki/Thumbor#Poolcounter-based; code wikimedia_thumbor/poolcounter/__init__.py)
- Swift (code wikimedia_thumbor/loader/swift/__init__.py, wikimedia_thumbor/result_storage/swift/swift.py)
- Error/exception handling
- Several files in wikimedia_thumbor/logging/
- Several files in wikimedia_thumbor/error_handlers/
- wikimedia_thumbor/storage/request/request.py (not sure what this does)
- wikimedia_thumbor/core/importer.py (not sure what this does)
- wikimedia_thumbor/core/context_importer.py (not sure what this does)
Testing PoolCounter and Swift might not be possible without getting these services running locally. This might be hard, particularly with Swift.
Change 833426 had a related patch set uploaded (by Vlad.shapik; author: Vlad.shapik):
[operations/software/thumbor-plugins@master] Add configurations to get an HTML test coverage report
Thanks @dom_walden and @pwangai for your research.
In addition, I want to say that 75% of the code is covered by tests. Since the building of a Docker image is based on Blubber, now it works a bit different than before. That's why I updated the instruction which helps to run checking of code coverage. Here is the patch.
Change 833426 merged by jenkins-bot:
[operations/software/thumbor-plugins@master] Update the logic to run code coverage