|
@@ -17,6 +17,15 @@ func TestParseNameParts(t *testing.T) {
|
|
|
want Name
|
|
|
wantValidDigest bool
|
|
|
}{
|
|
|
+ {
|
|
|
+ in: "scheme://host:port/namespace/model:tag",
|
|
|
+ want: Name{
|
|
|
+ Host: "host:port",
|
|
|
+ Namespace: "namespace",
|
|
|
+ Model: "model",
|
|
|
+ Tag: "tag",
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
in: "host/namespace/model:tag",
|
|
|
want: Name{
|
|
@@ -26,6 +35,15 @@ func TestParseNameParts(t *testing.T) {
|
|
|
Tag: "tag",
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ in: "host:port/namespace/model:tag",
|
|
|
+ want: Name{
|
|
|
+ Host: "host:port",
|
|
|
+ Namespace: "namespace",
|
|
|
+ Model: "model",
|
|
|
+ Tag: "tag",
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
in: "host/namespace/model",
|
|
|
want: Name{
|
|
@@ -35,9 +53,9 @@ func TestParseNameParts(t *testing.T) {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- in: "host:12345/namespace/model",
|
|
|
+ in: "host:port/namespace/model",
|
|
|
want: Name{
|
|
|
- Host: "host:12345",
|
|
|
+ Host: "host:port",
|
|
|
Namespace: "namespace",
|
|
|
Model: "model",
|
|
|
},
|