HomeSoftware Heritage

tests: migrate storage tests to pytest

Description

tests: migrate storage tests to pytest

  • extract a bunch of initialization/testdata in a conftest.py
  • add swh_indexer_storage and swh_indexer_storage_with_data fixtures
  • 'explode' the main CommonTestStorage class into several pieces (one for every 'entity type' dedicated endpoints, eg. content_mimetype, ctags, etc. plus one for misc endpoints),
  • get rid of the gen_generic_endpoint_tests() helper function, just write these test functions and inject them in endpoint_type specific test classes,
  • use these classes + the fixture based client/server test framework from swh.core for test_api_client,
  • use these classes for test_in_memory.

Details

Provenance
douarddaAuthored on Nov 8 2019, 1:16 PM
douarddaPushed on Nov 8 2019, 4:24 PM
Differential Revision
D2228: tests: migrate indexer storage tests to pytest
Parents
rDCIDXdb2a631da27f: proper pagination for IndexerStorage.origin_intrinsic_metadata_search_by_produc…
Branches
Unknown
Tags
Unknown
Build Status
Buildable 8910
Build 13011: test-and-buildJenkins