Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
package main |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 |
- "fmt" |
|
| 5 | 4 |
"os/exec" |
| 6 | 5 |
"strings" |
| 7 | 6 |
"testing" |
| ... | ... |
@@ -11,7 +10,9 @@ import ( |
| 11 | 11 |
func TestImagesEnsureImageIsListed(t *testing.T) {
|
| 12 | 12 |
imagesCmd := exec.Command(dockerBinary, "images") |
| 13 | 13 |
out, _, err := runCommandWithOutput(imagesCmd) |
| 14 |
- errorOut(err, t, fmt.Sprintf("listing images failed with errors: %v", err))
|
|
| 14 |
+ if err != nil {
|
|
| 15 |
+ t.Fatalf("listing images failed with errors: %s, %v", out, err)
|
|
| 16 |
+ } |
|
| 15 | 17 |
|
| 16 | 18 |
if !strings.Contains(out, "busybox") {
|
| 17 | 19 |
t.Fatal("images should've listed busybox")
|
| ... | ... |
@@ -46,7 +47,9 @@ func TestImagesOrderedByCreationDate(t *testing.T) {
|
| 46 | 46 |
} |
| 47 | 47 |
|
| 48 | 48 |
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "images", "-q", "--no-trunc")) |
| 49 |
- errorOut(err, t, fmt.Sprintf("listing images failed with errors: %v", err))
|
|
| 49 |
+ if err != nil {
|
|
| 50 |
+ t.Fatalf("listing images failed with errors: %s, %v", out, err)
|
|
| 51 |
+ } |
|
| 50 | 52 |
imgs := strings.Split(out, "\n") |
| 51 | 53 |
if imgs[0] != id3 {
|
| 52 | 54 |
t.Fatalf("First image must be %s, got %s", id3, imgs[0])
|