Add additional test coverage for the regexp contained in RepositoryNameRegexp
This was inspired by problems found with new regexps proposed in PR #690 Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
50de6d914c
commit
ceb2c7de44
2 changed files with 162 additions and 1 deletions
|
@ -66,6 +66,27 @@ func TestRouter(t *testing.T) {
|
|||
"name": "foo/bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
RouteName: RouteNameTags,
|
||||
RequestURI: "/v2/docker.com/foo/tags/list",
|
||||
Vars: map[string]string{
|
||||
"name": "docker.com/foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
RouteName: RouteNameTags,
|
||||
RequestURI: "/v2/docker.com/foo/bar/tags/list",
|
||||
Vars: map[string]string{
|
||||
"name": "docker.com/foo/bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
RouteName: RouteNameTags,
|
||||
RequestURI: "/v2/docker.com/foo/bar/baz/tags/list",
|
||||
Vars: map[string]string{
|
||||
"name": "docker.com/foo/bar/baz",
|
||||
},
|
||||
},
|
||||
{
|
||||
RouteName: RouteNameBlob,
|
||||
RequestURI: "/v2/foo/bar/blobs/tarsum.dev+foo:abcdef0919234",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue