so one can create database (e.g. for unit tests) of given flavor.
Details
- Reviewers
ardumont - Group Reviewers
Reviewers - Commits
- rDCOREb805b3106fb9: Add the 'flavor' argument to db_utils.initialize_database_for_module()
Diff Detail
- Repository
- rDCORE Foundations and core functionalities
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build is green
Patch application report for D8066 (id=29107)
Rebasing onto 87e7afab11...
Current branch diff-target is up to date.
Changes applied before test
commit 0d29492d6022f5c574d7714164937d955eacc242 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jul 1 14:58:31 2022 +0200 Add the 'flavor' argument to db_utils.initialize_database_for_module() so one can create database (e.g. for unit tests) of given flavor.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/454/ for more details.
lgtm but it's missing the test case around it. It should not be too hard to add a scenario which lifts the flavor parameter, shouldn't it?
possibly, but I had it tested from swh-storage (D8067) (but yeah a at least basic test in core would be better)
lgtm but it's missing the test case around it. It should not be too hard to add a
scenario which lifts the flavor parameter, shouldn't it? possibly, but I had it tested
from swh-storage (D8067)
ah yes, and i did not see it since it needs a release from swh.core with it (test
failing hence that diff is in draft).
(but yeah a at least basic test in core would be better)
yub yub
Build is green
Patch application report for D8066 (id=29163)
Rebasing onto d0e7f5a10e...
Current branch diff-target is up to date.
Changes applied before test
commit bcdf4cc7bdf1c15d74e766b9d055e70bb902ceb0 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jul 1 14:58:31 2022 +0200 Add the 'flavor' argument to db_utils.initialize_database_for_module() so one can create database (e.g. for unit tests) of given flavor.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/457/ for more details.
Build is green
Patch application report for D8066 (id=29164)
Rebasing onto d0e7f5a10e...
Current branch diff-target is up to date.
Changes applied before test
commit b805b3106fb9d4e0385a21c49fc4ff4be6584889 Author: David Douard <david.douard@sdfa3.org> Date: Fri Jul 1 14:58:31 2022 +0200 Add the 'flavor' argument to db_utils.initialize_database_for_module() so one can create database (e.g. for unit tests) of given flavor.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/458/ for more details.
swh/core/db/tests/test_db_utils.py | ||
---|---|---|
207 | if the flavor param is None, then no flavor is specified at swh db init time, but the default value will be 'default' according the sql code in 15-flavor.sql files (stolen from swh-storage). |
swh/core/db/tests/test_db_utils.py | ||
---|---|---|
207 | makes sense, thx. |