Migrate references to consolidated v2 package

Routes and errors are now all referenced from a single v2 package. This
packages exports are acceptable for use in the server side as well as
integration into docker core.
This commit is contained in:
Stephen J Day 2014-12-11 22:24:25 -08:00
parent 5abfc91021
commit d08f0edcf1
13 changed files with 82 additions and 83 deletions

View file

@ -6,7 +6,7 @@ import (
"net/url"
"testing"
"github.com/docker/docker-registry/api/urls"
"github.com/docker/docker-registry/api/v2"
"github.com/docker/docker-registry/configuration"
)
@ -17,10 +17,10 @@ import (
func TestAppDispatcher(t *testing.T) {
app := &App{
Config: configuration.Configuration{},
router: urls.Router(),
router: v2.Router(),
}
server := httptest.NewServer(app)
router := urls.Router()
router := v2.Router()
serverURL, err := url.Parse(server.URL)
if err != nil {
@ -72,33 +72,33 @@ func TestAppDispatcher(t *testing.T) {
vars []string
}{
{
endpoint: urls.RouteNameManifest,
endpoint: v2.RouteNameManifest,
vars: []string{
"name", "foo/bar",
"tag", "sometag",
},
},
{
endpoint: urls.RouteNameTags,
endpoint: v2.RouteNameTags,
vars: []string{
"name", "foo/bar",
},
},
{
endpoint: urls.RouteNameBlob,
endpoint: v2.RouteNameBlob,
vars: []string{
"name", "foo/bar",
"digest", "tarsum.v1+bogus:abcdef0123456789",
},
},
{
endpoint: urls.RouteNameBlobUpload,
endpoint: v2.RouteNameBlobUpload,
vars: []string{
"name", "foo/bar",
},
},
{
endpoint: urls.RouteNameBlobUploadChunk,
endpoint: v2.RouteNameBlobUploadChunk,
vars: []string{
"name", "foo/bar",
"uuid", "theuuid",