Replies: 1 comment
|
Hi @csbuja The database in that traceback is coverage.py's data file, not an application database. Coverage stores its data in a SQLite file whose default name is: So: means the user running pytest/pytest-cov cannot create or write the coverage data file at the selected location. The better Docker fix is to make the working/data directory writable by the runtime user, rather than trying to You can also explicitly put coverage data somewhere writable: ENV COVERAGE_FILE=/tmp/.coverageor configure coverage's If the project directory is intended to be writable, make its ownership match your container user instead: RUN chown -R appuser:appuser /workspace
USER appuserpytest itself does not own this database behavior; pytest-cov delegates coverage collection/storage to coverage.py. Please mark this answer as accepted if it helped, thank you. |
Uh oh!
There was an error while loading. Please reload this page.
https://stackoverflow.com/questions/64138038/docker-sqlite3-operationalerror-unable-to-open-database-file
Cross posting from Stack Overflow. What is the name of the database used in this post, so I can change the permissions for this DB file? My plan is to run chmod on the db file in my Dockerfile.
Thanks in advance!
All reactions