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.
Migrated from D7918 (view on Phabricator)
Merge request reports
Activity
Build is green
Patch application report for D7918 (id=28533)
Rebasing onto cb12394c...
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?
! In !793 (closed), @ardumont wrote: 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 ofdbname="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 ofdbname="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 a936cfda...
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 a936cfda...
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.