Fix host auth key format

This commit is contained in:
Bryce Lampe
2024-04-22 12:44:24 -07:00
parent 0f23201468
commit 7597ca32ca
2 changed files with 6 additions and 7 deletions

View File

@@ -90,7 +90,7 @@ func TestWrappedAuth(t *testing.T) {
config.DockerRegistryAuth: {
Username: "resource-dockerhub-user",
Password: "resource-dockerhub-password",
ServerAddress: config.DockerRegistryAuth,
ServerAddress: config.DockerRegistryDNS,
},
"misc": {
Username: "host-misc-user",
@@ -99,9 +99,9 @@ func TestWrappedAuth(t *testing.T) {
},
}
assert.Equal(t, expected, cli.auths)
assert.Len(t, h.auths, 2) // Host auth is unchanged.
assert.Len(t, h.auths, 2) // In-memory host auth is unchanged.
// Assert that our host's auth is untouched.
// Assert that our on-disk host's auth is untouched.
realhostRefreshed, err := newHost(nil)
require.NoError(t, err)
assert.Equal(t, realhost.auths, realhostRefreshed.auths)