HomeSoftware Heritage

tests: refactor SingleDbTestFixture class to add generic db initialization

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

tests: refactor SingleDbTestFixture class to add generic db initialization

based on sql files shipped within the python package. This require several
small refactorings of SingleDbTestFixture.setUpClass and .add_db() methods:

  • replace the 2 arguments (dump, dump_type) by a single 'dumps' one; this later must be an iterable of couples (dump_file, dump_type)
  • refactor all needed helper functions accordingly.

We also add a small helper function to sort numerical file names, and provide a
DB_DUMP_TYPES as a global variable to prepare the next commit in which a new
cli tool 'swh-db-init' is added.

Related to T1265.

Details

Provenance
douarddaAuthored on Oct 15 2018, 10:16 AM
douarddaPushed on Oct 17 2018, 3:44 PM
Differential Revision
D538: refactor SingleDbTestFixture class to add generic db initialization

Commit No Longer Exists

This commit no longer exists in the repository.