/* * Copyright 2026 Oleg Borodin * * */ 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, "test-oci", "localhost:1025/test:v1.0", "", "") require.NoError(t, err) } { 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) } }