refactor SingleDbTestFixture class to add generic db initialization
Closed
requested to merge generated-differential-D538-source into generated-differential-D538-target
- Oct 16, 2018
-
-
David Douard authored
makes swh-vault's tests a bit easier to write.
-
David Douard authored
related to T1265.
-
David Douard authored
used to initialise a database for a given (swh) module, like: swh-db-init storage
-
David Douard authored
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.
-