Page MenuHomeSoftware Heritage

Improve tests coverage by adding missing model types in journal_data
ClosedPublic

Authored by douardda on Jun 2 2020, 3:24 PM.

Details

Summary

Improve the coverage of the test set provided in journal_data, namely
add directories, snapshots and skipped contents.

This requires to adapt a bit the function assert_all_objects_consumed() from
pytest_plugin, because we want to be able to handle anonymizable objects
specifically. So for now, simply add an 'exclude' argument.

Event Timeline

Build is green

Patch application report for D3207 (id=11379)

Rebasing onto 3cac9cffe2...

Current branch diff-target is up to date.
Changes applied before test
commit bb3e386005f3eec6f174e88e71b52e2d8c179407
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri May 29 14:51:40 2020 +0200

    Improve tests coverage by adding missing model types in journal_data
    
    Improve the coverage of the test set provided in journal_data, namely
    add directories, snapshots and skipped contents.
    
    This requires to adapt a bit the function assert_all_objects_consumed() from
    pytest_plugin, because we want to be able to handle anonymizable objects
    specifically. So for now, simply add an 'exclude' argument.

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

This revision is now accepted and ready to land.Jun 2 2020, 3:56 PM

Adapt the code to swh.model 0.3

Build is green

Patch application report for D3207 (id=11397)

Rebasing onto 9c87cda729...

Current branch diff-target is up to date.
Changes applied before test
commit 64cd01fc7c049123e16341fa93239013f152bacc
Author: David Douard <david.douard@sdfa3.org>
Date:   Fri May 29 14:51:40 2020 +0200

    Improve tests coverage by adding missing model types in journal_data
    
    Improve the coverage of the test set provided in journal_data, namely
    add directories, snapshots and skipped contents.
    
    This requires to adapt a bit the function assert_all_objects_consumed() from
    pytest_plugin, because we want to be able to handle anonymizable objects
    specifically. So for now, simply add an 'exclude' argument.
    
    It also needs the kafka_to_value serializer function to ensure tuples are
    used instead of lists.

commit 5c27d5161eb9003d1615f10d1535e219b14ca493
Author: David Douard <david.douard@sdfa3.org>
Date:   Wed May 27 13:47:56 2020 +0200

    Adapt test data to swh.model 0.3
    
    in which parents are expected to be a tuple instead of a list.

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