Page MenuHomeSoftware Heritage

pytest_plugin: Order the fixture definitions in dependency order
ClosedPublic

Authored by ardumont on Sep 23 2020, 11:59 AM.

Details

Summary

The SwhDatabaseJanitor definition is kept down below though.

It's more to ease reading and maintenance.

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
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 D4015 (id=14165)

Could not rebase; Attempt merge onto 30cdb78f17...

Updating 30cdb78f..9ebbd4b5
Fast-forward
 swh/storage/pytest_plugin.py | 51 ++++++++++++++++++++------------------------
 1 file changed, 23 insertions(+), 28 deletions(-)
Changes applied before test
commit 9ebbd4b5eef556e8a5a8d5763e1b58ee6de93c21
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:56:34 2020 +0200

    pytest_plugin: Order the fixture definitions in dependency order
    
    The SwhDatabaseJanitor definition is kept down below though.

commit 6a093d03f70cf79e014a6180386520eb12508a99
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:04:43 2020 +0200

    pytest_plugin: Change dbname to storage to avoid clash in tests
    
    Other similar fixtures in other modules which use the same "tests" db already.
    Clash can then happen when table names exists in different modules (e.g.
    dbversion exist both in scheduler and storage dbs).

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/958/ for more details.

Build was aborted

Patch application report for D4015 (id=14168)

Could not rebase; Attempt merge onto 30cdb78f17...

Updating 30cdb78f..924621ff
Fast-forward
 swh/storage/pytest_plugin.py | 45 ++++++++++++++++++++------------------------
 1 file changed, 20 insertions(+), 25 deletions(-)
Changes applied before test
commit 924621fff8abf484a4e48ab8152814ec8668c10c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:56:34 2020 +0200

    pytest_plugin: Order the fixture definitions in dependency order

commit 6286e186ee08a3e68f332f19d512453d62f56c70
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:04:43 2020 +0200

    pytest_plugin: Change dbname to storage to avoid clash in tests
    
    Other similar fixtures in other modules which use the same "tests" db already.
    Clash can then happen when table names exists in different modules (e.g.
    dbversion exist both in scheduler and storage dbs).

commit 8c44a29e432f5edb6d5229415067e100a0aac523
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 12:24:04 2020 +0200

    pytest_plugin: Reuse swh_storage_postgresql connection string
    
    The `swh_storage_postgresql.dsn` string already contains the connection
    information necessary for the tests to run.

Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/961/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/961/console

Build is green

Patch application report for D4015 (id=14168)

Could not rebase; Attempt merge onto 30cdb78f17...

Updating 30cdb78f..924621ff
Fast-forward
 swh/storage/pytest_plugin.py | 45 ++++++++++++++++++++------------------------
 1 file changed, 20 insertions(+), 25 deletions(-)
Changes applied before test
commit 924621fff8abf484a4e48ab8152814ec8668c10c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:56:34 2020 +0200

    pytest_plugin: Order the fixture definitions in dependency order

commit 6286e186ee08a3e68f332f19d512453d62f56c70
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 11:04:43 2020 +0200

    pytest_plugin: Change dbname to storage to avoid clash in tests
    
    Other similar fixtures in other modules which use the same "tests" db already.
    Clash can then happen when table names exists in different modules (e.g.
    dbversion exist both in scheduler and storage dbs).

commit 8c44a29e432f5edb6d5229415067e100a0aac523
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Sep 23 12:24:04 2020 +0200

    pytest_plugin: Reuse swh_storage_postgresql connection string
    
    The `swh_storage_postgresql.dsn` string already contains the connection
    information necessary for the tests to run.

See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/962/ for more details.

This revision is now accepted and ready to land.Sep 23 2020, 1:10 PM