]> git.proxmox.com Git - libgit2.git/commit
tests: odb: make hash of fake backend configurable
authorPatrick Steinhardt <ps@pks.im>
Mon, 10 Apr 2017 08:31:22 +0000 (10:31 +0200)
committerPatrick Steinhardt <ps@pks.im>
Fri, 28 Apr 2017 12:05:44 +0000 (14:05 +0200)
commite29e802966b7d5a44d17108704f73cca26f815e8
tree599fe8ea8d2f612d519bf4d570e294c264a4bfe6
parent7df580fae64fad8c6682208e297df806ff34385e
tests: odb: make hash of fake backend configurable

In the odb::backend::nonrefreshing test suite, we set up a fake backend
so that we are able to determine if backend functions are called
correctly. During the setup, we also parse an OID which is later on used
to read out the pseudo-object. While this procedure works right now, it
will create problems later when we implement hash verification for
looked up objects. The current OID ("deadbeef") will not match the hash
of contents we give back to the ODB layer and thus cannot be verified.

Make the hash configurable so that we can simply switch the returned for
single tests.
tests/odb/backend/nonrefreshing.c