Add unit tests for auth challenge and endpoint

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan
2015-05-07 13:16:52 -07:00
parent 837a12db15
commit 03e0873125
6 changed files with 309 additions and 11 deletions

View File

@@ -25,8 +25,8 @@ import (
"golang.org/x/net/context"
)
// NewRepositoryClient creates a new Repository for the given repository name and endpoint
func NewRepositoryClient(ctx context.Context, name string, endpoint *RepositoryEndpoint) (distribution.Repository, error) {
// NewRepository creates a new Repository for the given repository name and endpoint
func NewRepository(ctx context.Context, name string, endpoint *RepositoryEndpoint) (distribution.Repository, error) {
if err := v2.ValidateRespositoryName(name); err != nil {
return nil, err
}