diff --git a/content/oci/oci.go b/content/oci/oci.go index 8a2f7904..8acd3dc9 100644 --- a/content/oci/oci.go +++ b/content/oci/oci.go @@ -509,7 +509,7 @@ func (s *Store) GC(ctx context.Context) error { dgst := dgstDir.Name() blobDigest := digest.NewDigestFromEncoded(digest.Algorithm(alg), dgst) err := blobDigest.Validate() - // skip unsupported directories + // skip irrelevant content if err != nil { continue } diff --git a/content/oci/oci_test.go b/content/oci/oci_test.go index 78d36050..f5b9fe3f 100644 --- a/content/oci/oci_test.go +++ b/content/oci/oci_test.go @@ -3016,7 +3016,7 @@ func TestStore_GCErrorPath(t *testing.T) { t.Error("failed to push test content to src") } - // test os.ReadDir() error + // unknown algorithm if err := os.Mkdir(path.Join(algPath, "sha666"), 0777); err != nil { t.Fatal(err) } @@ -3024,7 +3024,7 @@ func TestStore_GCErrorPath(t *testing.T) { t.Fatal("this error should be silently ignored") } - // test os.Remove() error + // os.Remove() error badDigest := digest.FromBytes([]byte("bad digest")).Encoded() badPath := path.Join(algPath, "sha256", badDigest) if err := os.Mkdir(badPath, 0777); err != nil {