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 <github@gone.nl>
(cherry picked from commit ae1727c41e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-19 18:12:39 +02:00
parent 830b5f1d2f
commit be307b2925
+2 -2
View File
@@ -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)
}
})
}