mirror of
https://github.com/docker/compose.git
synced 2025-07-23 21:54:40 +02:00
Add test for invalid registry name
This commit is contained in:
parent
280066a5f4
commit
ee4916cbf5
@ -61,6 +61,15 @@ func TestRegistryNameWithoutProtocol(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestInvalidCredentials(t *testing.T) {
|
||||
loader := &MockRegistryLoader{}
|
||||
loader.On(getAllCredentials).Return(registry("18.195.159.6:444", userPwdCreds("toto", "pwd")), nil)
|
||||
|
||||
creds, err := getRegistryCredentials(composeServices("gtardif/privateimg"), loader)
|
||||
assert.NilError(t, err)
|
||||
assert.Equal(t, len(creds), 0)
|
||||
}
|
||||
|
||||
func TestImageWithDotInName(t *testing.T) {
|
||||
loader := &MockRegistryLoader{}
|
||||
loader.On(getAllCredentials).Return(registry("index.docker.io", userPwdCreds("toto", "pwd")), nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user