rkt: Convert image name to be a valid acidentifier

This fixes a bug whereby an image reference that included a port was not
recognized after being downloaded, and so could not be run
This commit is contained in:
Euan Kemp
2016-10-07 18:51:49 -07:00
parent 4ecb032bc9
commit aff69401ae
3 changed files with 76 additions and 13 deletions

View File

@@ -314,6 +314,33 @@ func TestListImages(t *testing.T) {
},
},
},
{
[]*rktapi.Image{
{
Id: "sha512-a2fb8f390702",
Name: "quay.io_443/coreos/alpine-sh",
Version: "latest",
Annotations: []*rktapi.KeyValue{
{
Key: appcDockerRegistryURL,
Value: "quay.io:443",
},
{
Key: appcDockerRepository,
Value: "coreos/alpine-sh",
},
},
Size: 400,
},
},
[]kubecontainer.Image{
{
ID: "sha512-a2fb8f390702",
RepoTags: []string{"quay.io:443/coreos/alpine-sh:latest"},
Size: 400,
},
},
},
}
for i, tt := range tests {