Browse Source

Cleanup errorOut resp in images tests

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Jessica Frazelle 10 years ago
parent
commit
dd248dee3c
1 changed files with 6 additions and 3 deletions
  1. 6 3
      integration-cli/docker_cli_images_test.go

+ 6 - 3
integration-cli/docker_cli_images_test.go

@@ -1,7 +1,6 @@
 package main
 
 import (
-	"fmt"
 	"os/exec"
 	"strings"
 	"testing"
@@ -11,7 +10,9 @@ import (
 func TestImagesEnsureImageIsListed(t *testing.T) {
 	imagesCmd := exec.Command(dockerBinary, "images")
 	out, _, err := runCommandWithOutput(imagesCmd)
-	errorOut(err, t, fmt.Sprintf("listing images failed with errors: %v", err))
+	if err != nil {
+		t.Fatalf("listing images failed with errors: %s, %v", out, err)
+	}
 
 	if !strings.Contains(out, "busybox") {
 		t.Fatal("images should've listed busybox")
@@ -46,7 +47,9 @@ func TestImagesOrderedByCreationDate(t *testing.T) {
 	}
 
 	out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "images", "-q", "--no-trunc"))
-	errorOut(err, t, fmt.Sprintf("listing images failed with errors: %v", err))
+	if err != nil {
+		t.Fatalf("listing images failed with errors: %s, %v", out, err)
+	}
 	imgs := strings.Split(out, "\n")
 	if imgs[0] != id3 {
 		t.Fatalf("First image must be %s, got %s", id3, imgs[0])