From 829715366e14ecc6fde869549274e3dd98959d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=91=D0=BE=D1=80=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Tue, 10 Mar 2026 22:09:57 +0200 Subject: [PATCH] working commit --- pkg/repocli/pushimage_test.go | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkg/repocli/pushimage_test.go diff --git a/pkg/repocli/pushimage_test.go b/pkg/repocli/pushimage_test.go new file mode 100644 index 0000000..492c9c5 --- /dev/null +++ b/pkg/repocli/pushimage_test.go @@ -0,0 +1,40 @@ +package repocli + +import ( + "github.com/stretchr/testify/require" + + "context" + "testing" + "time" +) + +func TestPushImage(t *testing.T) { + { + ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + mw := NewBasicAuthMiddleware("mstore", "mstore") + cli := NewClient(nil, mw) + require.NotNil(t, cli) + + load := NewLoader(cli) + require.NotNil(t, load) + + err := load.Push(ctx, "localhost:1025/test:v1.0", "test-oci", "", "") + require.NoError(t, err) + } + //return + { + + ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) + cli := NewClient(nil, nil) + require.NotNil(t, cli) + + down := NewLoader(cli) + require.NotNil(t, down) + + rawref := "localhost:1025/test:v1.0" + destdir := "aaa2" + err := down.Pull(ctx, rawref, destdir, "", "") + require.NoError(t, err) + + } +}