فهرست منبع

Fix some go vet errors

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Alexander Morozov 10 سال پیش
والد
کامیت
4ee05a4d3e
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 2 2
      integration-cli/docker_cli_pull_test.go
  2. 1 1
      integration-cli/registry.go
  3. 2 2
      registry/endpoint_test.go

+ 2 - 2
integration-cli/docker_cli_pull_test.go

@@ -26,7 +26,7 @@ func TestPullImageWithAliases(t *testing.T) {
 		}
 		}
 		defer deleteImages(repo)
 		defer deleteImages(repo)
 		if out, err := exec.Command(dockerBinary, "push", repo).CombinedOutput(); err != nil {
 		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
 	// push it
 	if out, err := exec.Command(dockerBinary, "push", repo).CombinedOutput(); err != nil {
 	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
 	// remove it locally

+ 1 - 1
integration-cli/registry.go

@@ -60,7 +60,7 @@ func (t *testRegistryV2) Ping() error {
 		return err
 		return err
 	}
 	}
 	if resp.StatusCode != 200 {
 	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
 	return nil
 }
 }

+ 2 - 2
registry/endpoint_test.go

@@ -67,7 +67,7 @@ func TestValidateEndpointAmbiguousAPIVersion(t *testing.T) {
 	}
 	}
 
 
 	if testEndpoint.Version != APIVersion1 {
 	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.
 	// Make a test server which should validate as a v2 server.
@@ -87,6 +87,6 @@ func TestValidateEndpointAmbiguousAPIVersion(t *testing.T) {
 	}
 	}
 
 
 	if testEndpoint.Version != APIVersion2 {
 	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)
 	}
 	}
 }
 }