Browse Source

Merge pull request #8051 from jfrazelle/image-tag-can-be-one-letter-test-update

Update integration-cli tests to allow one-letter tag as valid
Tibor Vass 10 years ago
parent
commit
8b18a2da54
1 changed files with 2 additions and 2 deletions
  1. 2 2
      integration-cli/docker_cli_tag_test.go

+ 2 - 2
integration-cli/docker_cli_tag_test.go

@@ -55,7 +55,7 @@ func TestTagInvalidUnprefixedRepo(t *testing.T) {
 // ensure we don't allow the use of invalid tags; these tag operations should fail
 // ensure we don't allow the use of invalid tags; these tag operations should fail
 func TestTagInvalidPrefixedRepo(t *testing.T) {
 func TestTagInvalidPrefixedRepo(t *testing.T) {
 
 
-	invalidTags := []string{"repo:fo$z$", "repo:Foo@3cc", "repo:Foo$3", "repo:Foo*3", "repo:Fo^3", "repo:Foo!3", "repo:%goodbye", "repo:#hashtagit", "repo:F)xcz(", "repo:f", "repo:fwaytoolongandwaymorethan30characterslong", "repo:-foo", "repo:.."}
+	invalidTags := []string{"repo:fo$z$", "repo:Foo@3cc", "repo:Foo$3", "repo:Foo*3", "repo:Fo^3", "repo:Foo!3", "repo:%goodbye", "repo:#hashtagit", "repo:F)xcz(", "repo:fwaytoolongandwaymorethan30characterslong", "repo:-foo", "repo:.."}
 
 
 	for _, repotag := range invalidTags {
 	for _, repotag := range invalidTags {
 		tagCmd := exec.Command(dockerBinary, "tag", "busybox", repotag)
 		tagCmd := exec.Command(dockerBinary, "tag", "busybox", repotag)
@@ -73,7 +73,7 @@ func TestTagValidPrefixedRepo(t *testing.T) {
 		t.Fatal("couldn't find the busybox:latest image locally and failed to pull it")
 		t.Fatal("couldn't find the busybox:latest image locally and failed to pull it")
 	}
 	}
 
 
-	validRepos := []string{"fooo/bar", "fooaa/test"}
+	validRepos := []string{"fooo/bar", "fooaa/test", "foooo:t"}
 
 
 	for _, repo := range validRepos {
 	for _, repo := range validRepos {
 		tagCmd := exec.Command(dockerBinary, "tag", "busybox:latest", repo)
 		tagCmd := exec.Command(dockerBinary, "tag", "busybox:latest", repo)