commit-graph tests: split up corrupt_graph_and_verify()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 21 Feb 2019 22:37:46 +0000 (23:37 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Feb 2019 22:29:49 +0000 (14:29 -0800)
Split up the corrupt_graph_and_verify() function added in
d9b9f8a6fd ("commit-graph: verify catches corrupt signature",
2018-06-27) into its logical components of setting up the test itself,
doing the corruption in a particular way with "dd", and then finally
testing that stderr is what we expect.

This allows for re-using everything except the now slimmer
corrupt_graph_and_verify() to corrupt the graph in a way that doesn't
involve inserting a given byte sequence at a given position,
e.g. truncating it entirely to a custom value.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found