Use distribution's ValidateRepositoryName for remote name validation.

Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
This commit is contained in:
Shishir Mahajan 2015-05-29 10:22:33 -04:00
parent aa8d3d2ca3
commit d4c7ea4301
2 changed files with 12 additions and 38 deletions

View file

@ -742,9 +742,6 @@ func TestValidRemoteName(t *testing.T) {
// Allow embedded hyphens.
"docker-rules/docker",
// Allow underscores everywhere (as opposed to hyphens).
"____/____",
//Username doc and image name docker being tested.
"doc/docker",
}
@ -769,6 +766,11 @@ func TestValidRemoteName(t *testing.T) {
"docker-/docker",
"-docker-/docker",
// Don't allow underscores everywhere (as opposed to hyphens).
"____/____",
"_docker/_docker",
// Disallow consecutive hyphens.
"dock--er/docker",