Page MenuHomeSoftware Heritage

in_memory: Fix an update issue
ClosedPublic

Authored by anlambert on Thu, Feb 18, 5:39 PM.

Details

Summary

I forgot a test case and of course it was buggy with the memory search backend.

An error was raised when updating an origin containing the visit_types field
with a dict that does not contain it.

Diff Detail

Repository
rDSEA Archive search
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 D5112 (id=18257)

Rebasing onto 29c634c69e...

Current branch diff-target is up to date.
Changes applied before test
commit 00aade4bbc4537572c69dd64276739495f2a6b0b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Feb 18 17:38:40 2021 +0100

    in_memory: Fix an update issue
    
    An error was raised when updating an origin containing the visit_types field
    with a dict that does not contain it.

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/search/tests/test_search.py
186

docstring and/or better name, please

This revision now requires changes to proceed.Thu, Feb 18, 6:32 PM
  • Better test naming and commit message
  • Add docstring to new test

Build is green

Patch application report for D5112 (id=18268)

Rebasing onto 29c634c69e...

Current branch diff-target is up to date.
Changes applied before test
commit 2ba3565a17bd23bd2ed7c170030850b045545a2a
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Thu Feb 18 17:38:40 2021 +0100

    in_memory: Fix visit types update issue
    
    An error was raised when updating an origin containing the visit_types
    field with a dict that does not contain it.

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

This revision is now accepted and ready to land.Thu, Feb 18, 6:46 PM
This revision was automatically updated to reflect the committed changes.