Report blobs shallow verify could not check apart from missing ones (closes #318)
check / check (push) Waiting to run
check / check (push) Waiting to run
Shallow snapshot verify counted every error from checking a blob or the encrypted database as "missing" and printed the error nowhere, so a permission error or an S3 403 read as data loss. Now only a not-found answer from storage counts as missing. Any other error is reported as could not be checked, with the error storage returned, in the text report and under --json (the new unchecked list and database_check_error field), and the run fails. Under --quiet, which drops the report, each of those errors is logged as a warning on stderr. The database check moved into its own small function because the verify function was at the linter's length limit. Model: opus-5-5
This commit was merged in pull request #348.
This commit is contained in:
@@ -161,13 +161,14 @@ func TestVerifyManifestBlobsRejectsShortHash(t *testing.T) {
|
||||
Blobs: []snapshot.BlobInfo{{Hash: "abc", CompressedSize: 1}},
|
||||
}
|
||||
|
||||
verified, missing, mismatched, missingSize, err :=
|
||||
verified, missing, mismatched, missingSize, unchecked, err :=
|
||||
v.verifyManifestBlobs(manifest, &VerifyOptions{JSON: true})
|
||||
require.ErrorIs(t, err, errInvalidBlobHash)
|
||||
require.Zero(t, verified)
|
||||
require.Zero(t, missing)
|
||||
require.Zero(t, mismatched)
|
||||
require.Zero(t, missingSize)
|
||||
require.Empty(t, unchecked)
|
||||
}
|
||||
|
||||
// TestVerifyBlobChunksRejectsNegativeLength proves a blob_chunks row with a
|
||||
|
||||
Reference in New Issue
Block a user