From 60235a9e3dac2af9f0240b4ce2799aa8544c4d86 Mon Sep 17 00:00:00 2001 From: "Lixia (Sylvia) Lei" Date: Mon, 20 Jan 2025 19:05:03 +0800 Subject: [PATCH] set cov threshold to 80 Signed-off-by: Lixia (Sylvia) Lei --- .github/.codecov.yml | 2 +- registry/remote/repository.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.codecov.yml b/.github/.codecov.yml index 38ac600b..fae45030 100644 --- a/.github/.codecov.yml +++ b/.github/.codecov.yml @@ -15,7 +15,7 @@ coverage: status: project: default: - target: 75% + target: 80% if_ci_failed: error patch: default: diff --git a/registry/remote/repository.go b/registry/remote/repository.go index a37913c4..d9d4d172 100644 --- a/registry/remote/repository.go +++ b/registry/remote/repository.go @@ -1608,6 +1608,7 @@ func (s *manifestStore) generateDescriptor(resp *http.Response, ref registry.Ref // calculateDigestFromResponse calculates the actual digest of the response body // taking care not to destroy it in the process. func calculateDigestFromResponse(resp *http.Response, maxMetadataBytes int64) (digest.Digest, error) { + // TODO: move this to another PR if resp.Body == nil { return "", fmt.Errorf("%s %q: response body is nil", resp.Request.Method, resp.Request.URL) }