Page MenuHomeSoftware Heritage

test_retry: Use sample_data_model fixture to manipulate model objects
ClosedPublic

Authored by ardumont on Jul 15 2020, 5:44 PM.

Details

Summary

Make use of the fixture

This does not touch yet to the validate proxy (next diff [1])

Depends on D3509

Related to T2494

[1] D3511

Test Plan

tox

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

Build is green

Patch application report for D3510 (id=12418)

Could not rebase; Attempt merge onto f5811da184...

Updating f5811da1..134bd240
Fast-forward
 swh/storage/pytest_plugin.py            |  43 ++++-
 swh/storage/tests/conftest.py           |  23 ---
 swh/storage/tests/test_pytest_plugin.py |  60 +++++++
 swh/storage/tests/test_retry.py         | 278 ++++++++++++++------------------
 4 files changed, 223 insertions(+), 181 deletions(-)
 create mode 100644 swh/storage/tests/test_pytest_plugin.py
Changes applied before test
commit 134bd24080318d38197ac69cda2f01f02b831150
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 17:40:04 2020 +0200

    test_retry: Use sample_data_model fixture to manipulate model objects

commit 60a2dae6b461245cd6532e234cf651b247264b3c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 17:03:33 2020 +0200

    pytest-plugin: Expose a sample_data_model fixture
    
    This is almost the same fixture as sample_data except:
    - it's BaseModel object instance within
    - not complete as we cannot convert yet the metadata objects (there is a diff
      pending which will allow it but right now we cannot).
    
    The next commits will use this fixture to allow the switch from dict to model
    objects.

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

Fix passing along dict to skipped_content_add by mistake

swh/storage/tests/test_retry.py
250

Nope! Mistake here. Fixing.

swh/storage/tests/test_retry.py
250

nvm

Build is green

Patch application report for D3510 (id=12419)

Could not rebase; Attempt merge onto f5811da184...

Updating f5811da1..2e1ca5a2
Fast-forward
 swh/storage/pytest_plugin.py            |  43 ++++-
 swh/storage/tests/conftest.py           |  23 ---
 swh/storage/tests/test_pytest_plugin.py |  60 +++++++
 swh/storage/tests/test_retry.py         | 275 ++++++++++++++------------------
 4 files changed, 221 insertions(+), 180 deletions(-)
 create mode 100644 swh/storage/tests/test_pytest_plugin.py
Changes applied before test
commit 2e1ca5a2132545ab793f0a2e3cc74afd0afb7223
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 17:40:04 2020 +0200

    test_retry: Use sample_data_model fixture to manipulate model objects

commit 60a2dae6b461245cd6532e234cf651b247264b3c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 17:03:33 2020 +0200

    pytest-plugin: Expose a sample_data_model fixture
    
    This is almost the same fixture as sample_data except:
    - it's BaseModel object instance within
    - not complete as we cannot convert yet the metadata objects (there is a diff
      pending which will allow it but right now we cannot).
    
    The next commits will use this fixture to allow the switch from dict to model
    objects.

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

This revision is now accepted and ready to land.Jul 16 2020, 10:53 AM

Build is green

Patch application report for D3510 (id=12443)

Rebasing onto df3f46decc...

Current branch diff-target is up to date.
Changes applied before test
commit 14b164888928403cb2df4ab508961c9042318391
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 17:40:04 2020 +0200

    test_retry: Use sample_data_model fixture to manipulate model objects

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