Skip to content

Use the in-memory storage instead of mocks to test the webapp

Currently, the unit tests of swh-web heavily rely on mocking the methods of the swh.storage.Storage class. While the approach works, there is a couple of drawbacks with it:

  • tests implementation are hard to read and maintain for a newcomer
  • tests data are hardcoded and can end up not synchronized with the latest swh-storage schema
  • maintaining tests full of mocks is painful and too much time consuming

These tests must be rewritten using the new in-memory storage.


Migrated from T1271 (view on Phabricator)

Edited by Phabricator Migration user
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information