Page MenuHomeSoftware Heritage

Add tests to loader-mercurial
Closed, ResolvedPublic

Description

The loader-mercurial does not have tests (unit/integration).

(There is a verifier module which i don't use)

I'm using bare toplevel and repositories to make sure everything is fine but errors can slip through.

Add some.

Event Timeline

zack raised the priority of this task from Normal to High.Oct 1 2018, 7:39 PM
zack added subscribers: douardda, zack.

cc: @douardda , just because we discussed this today :)

ardumont closed this task as Resolved.Oct 10 2018, 2:45 PM
ardumont claimed this task.

(There is a verifier module which i don't use)

And now i do btw, example use is:

python3 -m swh.loader.mercurial.loader_verifier --verbose /home/storage/hg/repo/the-sandbox
DEBUG:root:preparing
DEBUG:swh.loader.mercurial.Bundle20Loader:Bundling at /home/storage/hg/repo/the-sandbox/HG20_none_bundle
DEBUG:root:getting contents
DEBUG:root:getting directories
DEBUG:root:getting revisions
DEBUG:root:getting releases
DEBUG:root:getting snapshot
DEBUG:root:Snapshot: {'id': b';\x8f\xe5\x8eF}\xebu\x97\xb1*_\xd3\xb2\xc0\x96\xb8\xc0 (', 'branches': {b'develop': {'target': b'\xa9\xc4SER\xdf7\x0fC\xf0\xef\x97\x14o9>\xf2\xf2\xa0\x8c', 'target_type': 'revision'}, b'HEAD': {'target': b'develop', 'target_type': 'alias'}, b'default': {'target': b'p\xe7P\xbb\x04a\x01\xfd\xce\xd0oB\x8es\xfe\xe4qP\x9cV', 'target_type': 'revision'}}}
DEBUG:swh.loader.mercurial.Bundle20Loader:Cleanup up working bundle /home/storage/hg/repo/the-sandbox/HG20_none_bundle
INFO:root:final count: cs 2 ds 3 revs 58 rels 0

Cheerrs,