Page MenuHomeSoftware Heritage

test_filter: Use model objects in tests and drop validate proxy
ClosedPublic

Authored by ardumont on Jul 15 2020, 8:05 PM.

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

Make sure we limit the size of the list to 2 elements so unpacking always work
even if the sample data changes

Build is green

Patch application report for D3513 (id=12422)

Could not rebase; Attempt merge onto f5811da184...

Updating f5811da1..7462e856
Fast-forward
 swh/storage/pytest_plugin.py            |  43 +++-
 swh/storage/tests/conftest.py           |  23 --
 swh/storage/tests/test_buffer.py        | 143 ++++++-------
 swh/storage/tests/test_filter.py        |  54 ++---
 swh/storage/tests/test_pytest_plugin.py |  60 ++++++
 swh/storage/tests/test_retry.py         | 368 +++++++++++++++-----------------
 6 files changed, 374 insertions(+), 317 deletions(-)
 create mode 100644 swh/storage/tests/test_pytest_plugin.py
Changes applied before test
commit 7462e85626b8cc4daf97022f03b1f3c64deb4e13
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 20:05:46 2020 +0200

    test_filter: Use model objects in tests and drop validate proxy

commit 1fb2cc42b053f37d276e61900eeb442a6627f667
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:29:45 2020 +0200

    test_buffer: Use model objects in tests and drop validate proxy

commit 11d3e162318873a76f9956c5795f1eb0e03ccd7c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:07:32 2020 +0200

    test_retry: Drop validate proxy when we can
    
    When we use the sample_data_model (almost all object types except the metadata
    ones), we can use a storage with no validate proxy.
    
    Depends on D3510

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/456/ for more details.

Build is green

Patch application report for D3513 (id=12423)

Could not rebase; Attempt merge onto f5811da184...

Updating f5811da1..29b5a593
Fast-forward
 swh/storage/pytest_plugin.py            |  43 +++-
 swh/storage/tests/conftest.py           |  23 --
 swh/storage/tests/test_buffer.py        | 143 ++++++-------
 swh/storage/tests/test_filter.py        |  54 ++---
 swh/storage/tests/test_pytest_plugin.py |  60 ++++++
 swh/storage/tests/test_retry.py         | 368 +++++++++++++++-----------------
 6 files changed, 374 insertions(+), 317 deletions(-)
 create mode 100644 swh/storage/tests/test_pytest_plugin.py
Changes applied before test
commit 29b5a593a406edd299db84b8800c4a1140070b28
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 20:05:46 2020 +0200

    test_filter: Use model objects in tests and drop validate proxy

commit 1fb2cc42b053f37d276e61900eeb442a6627f667
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:29:45 2020 +0200

    test_buffer: Use model objects in tests and drop validate proxy

commit 11d3e162318873a76f9956c5795f1eb0e03ccd7c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:07:32 2020 +0200

    test_retry: Drop validate proxy when we can
    
    When we use the sample_data_model (almost all object types except the metadata
    ones), we can use a storage with no validate proxy.
    
    Depends on D3510

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/457/ for more details.

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

Build is green

Patch application report for D3513 (id=12447)

Could not rebase; Attempt merge onto 14b1648889...

Updating 14b16488..21efe2a0
Fast-forward
 swh/storage/tests/test_buffer.py | 143 +++++++++++++++++++--------------------
 swh/storage/tests/test_filter.py |  54 ++++++++-------
 swh/storage/tests/test_retry.py  |  93 ++++++++++++++-----------
 3 files changed, 153 insertions(+), 137 deletions(-)
Changes applied before test
commit 21efe2a09ea6c77f51ddd142c1e8fc2d897a0398
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 20:05:46 2020 +0200

    test_filter: Use model objects in tests and drop validate proxy

commit 2ff4c6fcd5e760ec5895609aba784995335bb5b1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:29:45 2020 +0200

    test_buffer: Use model objects in tests and drop validate proxy

commit df45641008cd4a74db1d40f307a70013bed6f7b8
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 15 19:07:32 2020 +0200

    test_retry: Drop validate proxy when we can
    
    When we use the sample_data_model (almost all object types except the metadata
    ones), we can use a storage with no validate proxy.
    
    Depends on D3510

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