summaryrefslogtreecommitdiff
path: root/client/image_push_test.go
diff options
context:
space:
mode:
authorDerek McGowan <derek@mcgstyle.net>2017-01-25 16:54:18 -0800
committerDerek McGowan <derek@mcgstyle.net>2017-02-07 11:08:37 -0800
commit3a1279393faf78632bf169619d407e584da84b66 (patch)
tree25d89487c1dcfc045a0dc8bfa72dd2cf31d28489 /client/image_push_test.go
parent2bea87393b7673fc88531851803f073198527021 (diff)
downloaddocker-3a1279393faf78632bf169619d407e584da84b66.tar.gz
Use distribution reference
Remove forked reference package. Use normalized named values everywhere and familiar functions to convert back to familiar strings for UX and storage compatibility. Enforce that the source repository in the distribution metadata is always a normalized string, ignore invalid values which are not. Update distribution tests to use normalized values. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Diffstat (limited to 'client/image_push_test.go')
-rw-r--r--client/image_push_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/image_push_test.go b/client/image_push_test.go
index b52da8b8dc..f93debf5bb 100644
--- a/client/image_push_test.go
+++ b/client/image_push_test.go
@@ -21,7 +21,7 @@ func TestImagePushReferenceError(t *testing.T) {
}
// An empty reference is an invalid reference
_, err := client.ImagePush(context.Background(), "", types.ImagePushOptions{})
- if err == nil || err.Error() != "repository name must have at least one component" {
+ if err == nil || !strings.Contains(err.Error(), "invalid reference format") {
t.Fatalf("expected an error, got %v", err)
}
// An canonical reference cannot be pushed