working commit
This commit is contained in:
25
pullimage_test.go
Normal file
25
pullimage_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package repocli
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
//"fmt"
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestPullImage(t *testing.T) {
|
||||
|
||||
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
cli := NewClientWithTransport(nil, nil)
|
||||
require.NotNil(t, cli)
|
||||
|
||||
down := NewDownloader(cli)
|
||||
require.NotNil(t, down)
|
||||
|
||||
rawref := "mirror.gcr.io/alpine:3.20.0"
|
||||
destdir := "qwert"
|
||||
err := down.Pull(ctx, rawref, destdir, "linux", "amd64")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
Reference in New Issue
Block a user