Page MenuHomeSoftware Heritage

Use the in-mem storage instead of mocks in BaseLoaderTest.
ClosedPublic

Authored by vlorentz on Nov 20 2018, 3:56 PM.

Details

Summary

This Diff breaks all existing loader tests.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

The build is failing because this change depends on an unreleased version of swh.storage.

vlorentz retitled this revision from Use the in-mem storage instead of mocks. to Use the in-mem storage instead of mocks in BaseLoaderTest..
ardumont added a subscriber: ardumont.
ardumont added inline comments.
swh/loader/core/tests/__init__.py
174

self.assertIsNotNone(snap)?

286

\m/

This revision is now accepted and ready to land.Nov 20 2018, 5:03 PM

The build is failing because this change depends on an unreleased version of swh.storage.

I've just released one, meaning:

  • tag repository
  • build debian package (for consistency, 1 tag, 1 debian package so far)
  • go to jenkins, trigger back the build on the latest master. Wait for it to complete. That picks up the publish step to pypi (it did ;)

So we should be able to trigger the build back now and this should be fine.

So we should be able to trigger the build back now and this should be fine.

Unfortuntately, not yet. Everything i said is ok.
But the storage got pushed to test.pypi.org... and not pypi.org...

But the storage got pushed to test.pypi.org... and not pypi.org...

Something was wrong in the deployment. douardda fixed it and now the new version got uploaded to pypi.
I restarted the build to check if everything is fine here.

ardumont requested changes to this revision.EditedNov 21 2018, 10:24 AM

I restarted the build to check if everything is fine here.
BUILD has failed.

It's not fine.
There are real errors.
You did not check the test_loader.py module.

This revision now requires changes to proceed.Nov 21 2018, 10:24 AM
  • Adapt test_loader.py to work without LoaderNoStorage. I removed most of the classes because it's pointless to have so much code just to test duplicated threeliner functions.

I restarted the build to check if everything is fine here.
BUILD has failed.

It's not.
There are real errors.
You did not check the test_loader.py module.

Oops.

Now it actually fails because it depends on another diff ( D680) ^^

I removed most of the classes because it's pointless to have so much code just to test duplicated threeliner functions.

I disagree. It's not pointless. Well, it was not prior to this diff.
The point was to have enough coverage for others to be able to touch those with some parachute.

Now that you developed the real in-memory storage, those tests are no longer relevant.
So now, it's ok for those to go away. The in-memory storage is tested well enough ;)

Now it actually fails because it depends on another diff ( D680) ^^

I'll trust you on this ;)

This revision is now accepted and ready to land.Nov 21 2018, 3:58 PM

Now it actually fails because it depends on another diff ( D680) ^^

I'll trust you on this ;)

It will make all tests fail from now on, I would rather not land it

  • Don't initialize the storage, use the loader's instead.

Diffs are piling on top of this one, so I'll land it anyway.

This revision was automatically updated to reflect the committed changes.