Remove max repository component length restriction

Fixes #241

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
This commit is contained in:
Andy Goldstein 2015-03-05 10:11:37 -05:00
parent 27baf9eb73
commit ccfadc93aa
2 changed files with 14 additions and 32 deletions

View file

@ -1,6 +1,7 @@
package v2
import (
"strings"
"testing"
)
@ -23,7 +24,6 @@ func TestRepositoryNameRegexp(t *testing.T) {
},
{
input: "aa/aa/aa/aa/aa/aa/aa/aa/aa/bb/bb/bb/bb/bb/bb",
err: ErrRepositoryNameTooManyComponents,
},
{
input: "aa/aa/bb/bb/bb",
@ -66,6 +66,13 @@ func TestRepositoryNameRegexp(t *testing.T) {
input: "a-/a/a/a",
err: ErrRepositoryNameComponentInvalid,
},
{
input: strings.Repeat("a", 255),
},
{
input: strings.Repeat("a", 256),
err: ErrRepositoryNameLong,
},
} {
failf := func(format string, v ...interface{}) {