From ae1727c41ef71f41f7a689a800c8009591ccf0d8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 19 Aug 2025 12:39:10 +0200 Subject: [PATCH] cli/command: TestRetrieveAuthTokenFromImage: don't decode authconfig Rewrite the test to not depend on registry.DecodeAuthConfig, which may be moved internal to the daemon as part of the modules transition. Signed-off-by: Sebastiaan van Stijn --- cli/command/registry_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/command/registry_test.go b/cli/command/registry_test.go index 20bb234db2..6e4dfbbec8 100644 --- a/cli/command/registry_test.go +++ b/cli/command/registry_test.go @@ -185,9 +185,9 @@ func TestRetrieveAuthTokenFromImage(t *testing.T) { imageRef := path.Join(tc.prefix, remoteRef) actual, err := command.RetrieveAuthTokenFromImage(&cfg, imageRef) assert.NilError(t, err) - ac, err := registry.DecodeAuthConfig(actual) + expectedAuthCfg, err := registry.EncodeAuthConfig(tc.expectedAuthCfg) assert.NilError(t, err) - assert.Check(t, is.DeepEqual(*ac, tc.expectedAuthCfg)) + assert.Equal(t, actual, expectedAuthCfg) } }) }