Page MenuHomeSoftware Heritage

storage.in_memory: Fix a couple encountered issues
ClosedPublic

Authored by anlambert on Jan 25 2019, 4:30 PM.

Details

Summary

While rewriting swh-web tests, I encountered a couple of issues
with the in-memory storage:

  • an exception was raised when providing an invalid origin id to the origin*_get methods (my bad for this)
  • an exception was raised when providing an invalid revision id to the revision_log method.

That diff fixes those small issues and add tests for the expected
behavior.

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

anlambert edited the test plan for this revision. (Show Details)
anlambert added a reviewer: Reviewers.
vlorentz added inline comments.
swh/storage/tests/test_storage.py
2141

nitpick: should be renamed to test_origin_get_invalid_id

This revision is now accepted and ready to land.Jan 25 2019, 4:33 PM
anlambert added inline comments.
swh/storage/tests/test_storage.py
2141

Well seen, thanks!

Fixing that then landing that diff

This revision was automatically updated to reflect the committed changes.