mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Allow one character repository name components
The docker/distribution dependency was updated in the previous commit to allow repository name components to only consist of a single letter. The unit tests have been updated to cement this change. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
bfd5202c17
commit
451789cf88
1 changed files with 4 additions and 3 deletions
|
@ -760,6 +760,10 @@ func TestValidRemoteName(t *testing.T) {
|
||||||
|
|
||||||
//Username doc and image name docker being tested.
|
//Username doc and image name docker being tested.
|
||||||
"doc/docker",
|
"doc/docker",
|
||||||
|
|
||||||
|
// single character names are now allowed.
|
||||||
|
"d/docker",
|
||||||
|
"jess/t",
|
||||||
}
|
}
|
||||||
for _, repositoryName := range validRepositoryNames {
|
for _, repositoryName := range validRepositoryNames {
|
||||||
if err := validateRemoteName(repositoryName); err != nil {
|
if err := validateRemoteName(repositoryName); err != nil {
|
||||||
|
@ -793,9 +797,6 @@ func TestValidRemoteName(t *testing.T) {
|
||||||
// No repository.
|
// No repository.
|
||||||
"docker/",
|
"docker/",
|
||||||
|
|
||||||
//namespace too short
|
|
||||||
"d/docker",
|
|
||||||
|
|
||||||
//namespace too long
|
//namespace too long
|
||||||
"this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255/docker",
|
"this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255_this_is_not_a_valid_namespace_because_its_lenth_is_greater_than_255/docker",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue