testremote: Really fsck downloaded objects
8844372c23
exposted a bug in testremote, it
was passing the serialized key, not the object file, to be checksummed.
This commit is contained in:
parent
e154c6da92
commit
768cdee461
2 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,7 @@ git-annex (10.20240431) UNRELEASED; urgency=medium
|
||||||
whose content is not present.
|
whose content is not present.
|
||||||
* Avoid the --fast option preventing checksumming in some cases it
|
* Avoid the --fast option preventing checksumming in some cases it
|
||||||
was not supposed to.
|
was not supposed to.
|
||||||
|
* testremote: Really fsck downloaded objects.
|
||||||
* Typo fixes.
|
* Typo fixes.
|
||||||
Thanks, Yaroslav Halchenko
|
Thanks, Yaroslav Halchenko
|
||||||
|
|
||||||
|
|
|
@ -295,7 +295,9 @@ test runannex mkr mkk =
|
||||||
Nothing -> return True
|
Nothing -> return True
|
||||||
Just b -> case Types.Backend.verifyKeyContent b of
|
Just b -> case Types.Backend.verifyKeyContent b of
|
||||||
Nothing -> return True
|
Nothing -> return True
|
||||||
Just verifier -> verifier k (serializeKey' k)
|
Just verifier -> do
|
||||||
|
loc <- Annex.calcRepo (gitAnnexLocation k)
|
||||||
|
verifier k loc
|
||||||
get r k = logStatusAfter k $ getViaTmp (Remote.retrievalSecurityPolicy r) (RemoteVerify r) k (AssociatedFile Nothing) Nothing $ \dest ->
|
get r k = logStatusAfter k $ getViaTmp (Remote.retrievalSecurityPolicy r) (RemoteVerify r) k (AssociatedFile Nothing) Nothing $ \dest ->
|
||||||
tryNonAsync (Remote.retrieveKeyFile r k (AssociatedFile Nothing) (fromRawFilePath dest) nullMeterUpdate (RemoteVerify r)) >>= \case
|
tryNonAsync (Remote.retrieveKeyFile r k (AssociatedFile Nothing) (fromRawFilePath dest) nullMeterUpdate (RemoteVerify r)) >>= \case
|
||||||
Right v -> return (True, v)
|
Right v -> return (True, v)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue