Page MenuHomeSoftware Heritage

tests/identifiers: fix 'target', 'directory' and 'parents' object types

Authored by douardda on Wed, Mar 11, 5:55 PM.



These are expected to be bytes, not str.

Depends on D2817.

Diff Detail

rDMOD Data Model
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.Wed, Mar 11, 5:55 PM
ardumont accepted this revision.Wed, Mar 11, 7:57 PM
This revision is now accepted and ready to land.Wed, Mar 11, 7:57 PM
olasd requested changes to this revision.Wed, Mar 11, 8:06 PM
olasd added a subscriber: olasd.

Thanks for this change.

I'm not sure why the type of ids isn't changed as well?

Stylistically, I'm really not sure about the inconsistent replacement of hash_to_bytes calls, with a shorthand that we've never used anywhere else. And the bhex name doesn't look very meaningful (frankly, if we're going there, I'd rather have it called b()).

This revision now requires changes to proceed.Wed, Mar 11, 8:06 PM
douardda updated this revision to Diff 10016.Thu, Mar 12, 2:29 PM

replace bhex() by _x() and other stuff reported by olasd

olasd accepted this revision.Thu, Mar 12, 2:33 PM

I still think the id bytes / hex string inconsistency for releases, revisions, directories and contents should be fixed, but I think this short-hand notation looks decent.

This revision is now accepted and ready to land.Thu, Mar 12, 2:33 PM