зеркало из https://github.com/microsoft/docker.git
Cleanup errorOut resp in tag test
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
This commit is contained in:
Родитель
b645df1d39
Коммит
475235ba7e
|
@ -13,8 +13,9 @@ func TestTagUnprefixedRepoByName(t *testing.T) {
|
|||
}
|
||||
|
||||
tagCmd := exec.Command(dockerBinary, "tag", "busybox:latest", "testfoobarbaz")
|
||||
out, _, err := runCommandWithOutput(tagCmd)
|
||||
errorOut(err, t, fmt.Sprintf("%v %v", out, err))
|
||||
if out, _, err := runCommandWithOutput(tagCmd); err != nil {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
|
||||
deleteImages("testfoobarbaz")
|
||||
|
||||
|
@ -25,12 +26,15 @@ func TestTagUnprefixedRepoByName(t *testing.T) {
|
|||
func TestTagUnprefixedRepoByID(t *testing.T) {
|
||||
getIDCmd := exec.Command(dockerBinary, "inspect", "-f", "{{.Id}}", "busybox")
|
||||
out, _, err := runCommandWithOutput(getIDCmd)
|
||||
errorOut(err, t, fmt.Sprintf("failed to get the image ID of busybox: %v", err))
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get the image ID of busybox: %s, %v", out, err)
|
||||
}
|
||||
|
||||
cleanedImageID := stripTrailingCharacters(out)
|
||||
tagCmd := exec.Command(dockerBinary, "tag", cleanedImageID, "testfoobarbaz")
|
||||
out, _, err = runCommandWithOutput(tagCmd)
|
||||
errorOut(err, t, fmt.Sprintf("%s %s", out, err))
|
||||
if out, _, err = runCommandWithOutput(tagCmd); err != nil {
|
||||
t.Fatal(out, err)
|
||||
}
|
||||
|
||||
deleteImages("testfoobarbaz")
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче