Prepare DB testing tools and data in dev dockerfile#900
Prepare DB testing tools and data in dev dockerfile#900tai271828 wants to merge 2 commits intopycontw:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
=======================================
Coverage 76.21% 76.21%
=======================================
Files 79 79
Lines 2930 2930
=======================================
Hits 2233 2233
Misses 697 697 Continue to review full report at Codecov.
|
|
+1 on this, makes creating new page much easier. I think db-testing-data.json can be pruned, right now it's 2000+ lines and contains mostly data not related to page content (e.g. admin, auth, session). IIRC you can export just some of the models |
| RUN apt-get install apt-utils -y | ||
| RUN apt-get update | ||
| RUN apt-get install gettext python3-pip -y | ||
| RUN apt-get install postgresql-client -y |
There was a problem hiding this comment.
A bit of nitpicking, but strictly speaking the client is not required since you can just docker exec -it $db_container psql to use the postgresql client that's inside the database container.
However this does make development much friendlier. Maybe add this in a separate commit instead so it's not implied that postgresql-client is required to run manage.py loaddata?
Types of changes
Description
A begging movement for issue #891.
Steps to Test This Pull Request
Steps to reproduce the behavior:
./enter_dev_env.shundercontrib. (refer tocontrib/dev_env.mdfor more details about how to build dev containers with docker-compose)Expected behavior
Inject DB testing data)Related Issue
#891 ## More Information
Screenshots
The media image files not presented are expected. We may commit the binary image files or big svg files later when we agree with each other to use this docker entry point to inject DB testing data for easier and more friendly code review process.
Additional context
This pull request does not provide a comprehensive solution for DB testing. Apart from that, it kicks off the whole story of issue #891 .