Page MenuHomeSoftware Heritage

pytest-plugin: Expose a sample_data_model fixture
ClosedPublic

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

Details

Summary

This is almost the same fixture as sample_data except:

  • it's BaseModel object instances within
  • unfortunately, not complete as we cannot convert yet the metadata objects

(there is a diff pending [1] which will allow it but right now we cannot).

The next commits [2] will use this fixture to allow:

  • the switch from dict to model objects.
  • drop the validation proxy
  • expose "sample_data" with model objects directly (and drop sample_data_model) [3]

Related to T2494

[1] D3456

[2] D3510

[3] In the mean time, hopefully the change about the metadata model objects
will have happened

Test Plan

tox

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13638
Build 20888: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 20887: arc lint + arc unit

Event Timeline

swh/storage/tests/conftest.py
38

This was dead code and now it's alive again ;)

Build is green

Patch application report for D3509 (id=12416)

Rebasing onto f5811da184...

Current branch diff-target is up to date.
Changes applied before test
commit 879cd146417c33e591084bdae7ea8d1f8cfe3401
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/450/ for more details.

correctness, then refactor please @ardu ;)

Build is green

Patch application report for D3509 (id=12417)

Rebasing onto f5811da184...

Current branch diff-target is up to date.
Changes applied before test
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/451/ for more details.

ardumont edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 16 2020, 10:48 AM

Build is green

Patch application report for D3509 (id=12440)

Rebasing onto 8bc79443ed...

Current branch diff-target is up to date.
Changes applied before test
commit df3f46decce326c2251d592b65a988e4d98481ce
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/459/ for more details.