From 4ee05a4d3e6f9ad955d96075a1e63d59ed73ac78 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Mon, 2 Feb 2015 14:53:20 -0800 Subject: [PATCH] Fix some go vet errors Signed-off-by: Alexander Morozov --- integration-cli/docker_cli_pull_test.go | 4 ++-- integration-cli/registry.go | 2 +- registry/endpoint_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/integration-cli/docker_cli_pull_test.go b/integration-cli/docker_cli_pull_test.go index 14f0642e07..041a914d9e 100644 --- a/integration-cli/docker_cli_pull_test.go +++ b/integration-cli/docker_cli_pull_test.go @@ -26,7 +26,7 @@ func TestPullImageWithAliases(t *testing.T) { } defer deleteImages(repo) if out, err := exec.Command(dockerBinary, "push", repo).CombinedOutput(); err != nil { - t.Fatalf("Failed to push image %v: error %v, output %q", err, string(out)) + t.Fatalf("Failed to push image %v: error %v, output %q", repo, err, string(out)) } } @@ -67,7 +67,7 @@ func TestPullVerified(t *testing.T) { // push it if out, err := exec.Command(dockerBinary, "push", repo).CombinedOutput(); err != nil { - t.Fatalf("Failed to push image %v: error %v, output %q", err, string(out)) + t.Fatalf("Failed to push image %v: error %v, output %q", repo, err, string(out)) } // remove it locally diff --git a/integration-cli/registry.go b/integration-cli/registry.go index d24ff5c98a..8290e710fd 100644 --- a/integration-cli/registry.go +++ b/integration-cli/registry.go @@ -60,7 +60,7 @@ func (t *testRegistryV2) Ping() error { return err } if resp.StatusCode != 200 { - return fmt.Errorf("registry ping replied with an unexpected status code %s", resp.StatusCode) + return fmt.Errorf("registry ping replied with an unexpected status code %d", resp.StatusCode) } return nil } diff --git a/registry/endpoint_test.go b/registry/endpoint_test.go index 00c27b448c..9567ba2352 100644 --- a/registry/endpoint_test.go +++ b/registry/endpoint_test.go @@ -67,7 +67,7 @@ func TestValidateEndpointAmbiguousAPIVersion(t *testing.T) { } if testEndpoint.Version != APIVersion1 { - t.Fatalf("expected endpoint to validate to %s, got %s", APIVersion1, testEndpoint.Version) + t.Fatalf("expected endpoint to validate to %d, got %d", APIVersion1, testEndpoint.Version) } // Make a test server which should validate as a v2 server. @@ -87,6 +87,6 @@ func TestValidateEndpointAmbiguousAPIVersion(t *testing.T) { } if testEndpoint.Version != APIVersion2 { - t.Fatalf("expected endpoint to validate to %s, got %s", APIVersion2, testEndpoint.Version) + t.Fatalf("expected endpoint to validate to %d, got %d", APIVersion2, testEndpoint.Version) } }