vendor: github.com/moby/moby/api, client 0769fe708773 (master)

full diff: 4ca8aedf92...0769fe7087

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-10-06 12:54:54 +02:00
parent 6ddff81bee
commit f81816ef88
175 changed files with 1514 additions and 1830 deletions

View File

@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"io"
"strings"
"testing"
"github.com/docker/cli/internal/test"
@ -74,9 +73,9 @@ func TestNewPullCommandSuccess(t *testing.T) {
for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{
imagePullFunc: func(ref string, options client.ImagePullOptions) (io.ReadCloser, error) {
imagePullFunc: func(ref string, options client.ImagePullOptions) (client.ImagePullResponse, error) {
assert.Check(t, is.Equal(tc.expectedTag, ref), tc.name)
return io.NopCloser(strings.NewReader("")), nil
return client.ImagePullResponse{}, nil
},
})
cmd := newPullCommand(cli)
@ -120,8 +119,8 @@ func TestNewPullCommandWithContentTrustErrors(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
t.Setenv("DOCKER_CONTENT_TRUST", "true")
cli := test.NewFakeCli(&fakeClient{
imagePullFunc: func(ref string, options client.ImagePullOptions) (io.ReadCloser, error) {
return io.NopCloser(strings.NewReader("")), errors.New("shouldn't try to pull image")
imagePullFunc: func(ref string, options client.ImagePullOptions) (client.ImagePullResponse, error) {
return client.ImagePullResponse{}, errors.New("shouldn't try to pull image")
},
})
cli.SetNotaryClient(tc.notaryFunc)