From 1afa7ac002aee3b406249dfcf1b2e5119029ef54 Mon Sep 17 00:00:00 2001 From: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> Date: Thu, 22 Oct 2026 11:22:04 +0200 Subject: [PATCH] internal/test: keep FakeCli from contacting Docker Desktop Tests that use FakeCli pull, push, and create containers through RetrieveAuthTokenFromImage. Disable the Docker Desktop lookup, so that they never reach the Docker Desktop of the machine they run on. Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com> --- internal/test/cli.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/test/cli.go b/internal/test/cli.go index 4a5b0bf9a0..151dcadad0 100644 --- a/internal/test/cli.go +++ b/internal/test/cli.go @@ -12,6 +12,7 @@ import ( manifeststore "github.com/docker/cli/cli/manifest/store" "github.com/docker/cli/cli/streams" "github.com/docker/cli/internal/registryclient" + "github.com/docker/cli/internal/secretsengine" "github.com/moby/moby/client" ) @@ -35,6 +36,7 @@ type FakeCli struct { // NewFakeCli returns a fake for the command.Cli interface func NewFakeCli(apiClient client.APIClient, opts ...func(*FakeCli)) *FakeCli { + secretsengine.Disable() outBuffer := new(bytes.Buffer) errBuffer := new(bytes.Buffer) c := &FakeCli{