Skip to content
Snippets Groups Projects

common/archive: Fix empty content handling in lookup_content_raw

1 unresolved thread

The bytes of the empty content are currently reported as missing in the archive due to an invalid test in swh.common.archive.lookup_content_raw.

See https://archive.softwareheritage.org/api/1/content/sha1_git:e69de29bb2d1d6434b8b29ae775ad8c2e48c5391/raw/


Migrated from D4237 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
627 628 assert actual_content == expected_content
628 629
629 630
631 @given(empty_content())
632 def test_lookup_empty_content_raw(archive_data, empty_content):
633 content_raw = archive.lookup_content_raw(f"sha1_git:{empty_content['sha1_git']}")
  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Author Maintainer

    Use f-string

  • Build is green

    Patch application report for D4237 (id=14958)

    Rebasing onto 0e98684b...

    Current branch diff-target is up to date.
    Changes applied before test
    commit eb077d9cb6c4615bf8550ac84a747dd3565acd76
    Author: Antoine Lambert <antoine.lambert@inria.fr>
    Date:   Mon Oct 12 16:23:22 2020 +0200
    
        common/archive: Fix empty content handling in lookup_content_raw

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

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading