mirror of
https://github.com/rancher/rke.git
synced 2025-08-01 07:08:38 +00:00
Add test case for GetKubeletDockerConfig
This covers https://github.com/rancher/rancher/issues/27029
This commit is contained in:
parent
089554f0d6
commit
e76585ace7
@ -45,3 +45,15 @@ func TestPrivateRegistry(t *testing.T) {
|
|||||||
assert.Equal(t, a, a2)
|
assert.Equal(t, a, a2)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetKubeletDockerConfig(t *testing.T) {
|
||||||
|
e := "{\"auths\":{\"https://registry.example.com\":{\"auth\":\"dXNlcjE6cGFzc3d+cmQ=\"}}}"
|
||||||
|
c, err := GetKubeletDockerConfig(map[string]v3.PrivateRegistry{
|
||||||
|
"https://registry.example.com": v3.PrivateRegistry{
|
||||||
|
User: "user1",
|
||||||
|
Password: "passw~rd",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
assert.Nil(t, err)
|
||||||
|
assert.Equal(t, c, e)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user