Page MenuHomeSoftware Heritage

storage.api.server: Add types to module and refactor tests
ClosedPublic

Authored by ardumont on Oct 16 2020, 10:15 AM.

Details

Summary
  • Refactor the tests to simplify the reading (use pytest.raises' match behavior)
  • Add types on impacted functions so the coverage shows as well

Not really for review. Preparatory work to fix configuration discrepancy which
is the source of the docker-dev error.

Test Plan

tox

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D4279 (id=15134)

Rebasing onto 07c96743d7...

Current branch diff-target is up to date.
Changes applied before test
commit 934592a141bca2d494b9b02df5a802e4fc5bdc4e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Oct 16 10:15:26 2020 +0200

    storage.api.server: Add types to module and refactor tests

See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/93/ for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 16 2020, 10:18 AM
This revision was automatically updated to reflect the committed changes.