Fix go vet warnings

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov
2014-08-13 11:37:30 +04:00
parent 64579f51fc
commit 391c35c822
8 changed files with 24 additions and 13 deletions

View File

@@ -1836,7 +1836,7 @@ func TestBuildFromGIT(t *testing.T) {
t.Fatal(err)
}
if res != "docker" {
t.Fatal("Maintainer should be docker, got %s", res)
t.Fatalf("Maintainer should be docker, got %s", res)
}
logDone("build - build from GIT")
}

View File

@@ -76,7 +76,7 @@ func TestCLIGetEventsContainerEvents(t *testing.T) {
eventsCmd := exec.Command(dockerBinary, "events", "--since=0", fmt.Sprintf("--until=%d", time.Now().Unix()))
out, exitCode, err := runCommandWithOutput(eventsCmd)
if exitCode != 0 || err != nil {
t.Fatal("Failed to get events with exit code %d: %s", exitCode, err)
t.Fatalf("Failed to get events with exit code %d: %s", exitCode, err)
}
events := strings.Split(out, "\n")
events = events[:len(events)-1]
@@ -119,7 +119,7 @@ func TestCLIGetEventsImageUntagDelete(t *testing.T) {
eventsCmd := exec.Command(dockerBinary, "events", "--since=0", fmt.Sprintf("--until=%d", time.Now().Unix()))
out, exitCode, err := runCommandWithOutput(eventsCmd)
if exitCode != 0 || err != nil {
t.Fatal("Failed to get events with exit code %d: %s", exitCode, err)
t.Fatalf("Failed to get events with exit code %d: %s", exitCode, err)
}
events := strings.Split(out, "\n")
t.Log(events)

View File

@@ -102,7 +102,7 @@ func TestContainerOrphaning(t *testing.T) {
t.Fatalf("%v: %s", err, out)
}
if !strings.Contains(out, img1) {
t.Fatal("Orphaned container (could not find '%s' in docker images): %s", img1, out)
t.Fatalf("Orphaned container (could not find '%s' in docker images): %s", img1, out)
}
deleteAllContainers()