mirror of
https://github.com/docker/compose.git
synced 2026-10-21 19:33:28 +00:00
Add test for invalid registry name
This commit is contained in:
parent
280066a5f4
commit
ee4916cbf5
1 changed files with 9 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue