working commit

This commit is contained in:
2026-03-06 16:26:24 +02:00
parent ef9a3f6b20
commit 82550622be
12 changed files with 347 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package repocli
import (
"github.com/stretchr/testify/require"
"context"
"fmt"
"testing"
"time"
)
func xxxTestClientBlobExists(t *testing.T) {
rawrepos := []string{
"mirror.gcr.io/alpine",
}
for _, rawrepo := range rawrepos {
cli := NewClient()
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
digstr := "sha256:3b8747b05489980f63da1d2b8e5a444c55777f69540394397b0bc1c76c3e41f2"
exist, size, err := cli.BlobExists(ctx, rawrepo, digstr)
require.NoError(t, err)
require.True(t, exist)
fmt.Printf("Size: %d\n", size)
}
}