instead of swh-core's postgresql_fact one, since we actually do not
use its custom features any more in swh-storage.
Details
- Reviewers
vlorentz ardumont - Group Reviewers
Reviewers - Maniphest Tasks
- T4286: Replace usage of swh.core's postgresql_fact by stock pytest_postgresql's factory function
- Commits
- rDSTOe64d64e4daad: pytest_plugin: use the stock pytest_postgresql postgresql factory
Diff Detail
- Repository
- rDSTO Storage manager
- Branch
- pytest
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 29652 Build 46343: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 46342: arc lint + arc unit
Event Timeline
Build is green
Patch application report for D7918 (id=28533)
Rebasing onto cb12394c34...
Current branch diff-target is up to date.
Changes applied before test
commit 4b41bdf96f18ffa0fdf90ec239c43ee6f2e050a3 Author: David Douard <david.douard@sdfa3.org> Date: Tue May 31 12:37:04 2022 +0200 pytest_plugin: use the stock pytest_postgresql postgresql factory instead of swh-core's postgresql_fact one, since we actually do not use its custom features any more in swh-storage.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1615/ for more details.
instead of swh-core's postgresql_fact one, since we actually do not
use its custom features any more in swh-storage.
Well, initially the feature used was the reset between tables to make
it faster than it was (and it worked 'cause it was hellishly slow to drop
and create tables again).
So, now storage uses the template to make the tests go as fast, is that it?
yes, when using the load argument of the postgresql_proc factory, it is used to initialize the template database used to create the db for each test.
For this to work, the dbname used when calling the postgresql_proc factory function must be the same as the one used to call the postgresql factory (so the removal of dbname="storage" in this diff; just use default db names unless specifically needed).
instead of swh-core's postgresql_fact one, since we actually do not
use its custom features any more in swh-storage.Well, initially the feature used was the reset between tables to make
it faster than it was (and it worked 'cause it was hellishly slow to drop
and create tables again).So, now storage uses the template to make the tests go as fast, is that it?
yes, when using the load argument of the postgresql_proc factory, it is used to initialize the template database used to create the db for each test.
For this to work, the dbname used when calling the postgresql_proc factory function must be the same as the one used to call the postgresql factory (so the removal of dbname="storage" in this diff; just use default db names unless specifically needed).
nice.
Build is green
Patch application report for D7918 (id=28536)
Rebasing onto a936cfda1f...
Current branch diff-target is up to date.
Changes applied before test
commit bb68fcecfbae9779d1ad90965e2a2abc5a2c6aff Author: David Douard <david.douard@sdfa3.org> Date: Tue May 31 12:37:04 2022 +0200 pytest_plugin: use the stock pytest_postgresql postgresql factory instead of swh-core's postgresql_fact one, since we actually do not use its custom features any more in swh-storage.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1616/ for more details.
Build is green
Patch application report for D7918 (id=28567)
Rebasing onto a936cfda1f...
Current branch diff-target is up to date.
Changes applied before test
commit e64d64e4daada920e55476a3ece92ea453699290 Author: David Douard <david.douard@sdfa3.org> Date: Tue May 31 12:37:04 2022 +0200 pytest_plugin: use the stock pytest_postgresql postgresql factory instead of swh-core's postgresql_fact one, since we actually do not use its custom features any more in swh-storage.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1617/ for more details.