Page MenuHomeSoftware Heritage

Unmock libmagic.
ClosedPublic

Authored by vlorentz on Jan 8 2019, 1:57 PM.

Details

Reviewers
ardumont
Group Reviewers
Reviewers
Summary

That was useless

Diff Detail

Repository
rDCIDX Metadata indexer
Branch
unmock-libmagic
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3280
Build 4226: tox-on-jenkinsJenkins
Build 4225: arc lint + arc unit

Event Timeline

The idea was to avoid calling side-effect function and depend on the actual call.
In the long run, i wanted to avoid failures here because for example, the inner implementation changed their detection mechanism.

The idea was to avoid calling side-effect function and depend on the actual call.

I don't think there's any side-effect

In the long run, i wanted to avoid failures here because for example, the inner implementation changed their detection mechanism.

In which case we'll just get a test failure.
On the other hand, mocking libmagic means we don't test that we use libmagic properly.

I don't think there's any side-effect

reading a file is a side-effect...
wait, we are no longer reading a file (first implementation did ;)

In which case we'll just get a test failure.

Yes, but that's not something i wanted. That's libmagic's job to properly test itself.

On the other hand, mocking libmagic means we don't test that we use libmagic properly.

Yes, that was the goal at the time.


To be clear, i'm not fighting this, just mentioning the initial idea.

This revision is now accepted and ready to land.Jan 8 2019, 2:15 PM