Merge pull request #6559 from vieux/bump_v1.0.1

Bump v1.0.1
This commit is contained in:
Victor Vieux 2014-06-19 18:03:54 -07:00
commit 376022dda8
2 changed files with 5 additions and 5 deletions

View file

@ -37,12 +37,12 @@ func pingRegistryEndpoint(endpoint string) (RegistryInfo, error) {
}
httpDial := func(proto string, addr string) (net.Conn, error) {
// Set the connect timeout to 5 seconds
conn, err := net.DialTimeout(proto, addr, time.Duration(5)*time.Second)
conn, err := net.DialTimeout(proto, addr, 5*time.Second)
if err != nil {
return nil, err
}
// Set the recv timeout to 10 seconds
conn.SetDeadline(time.Now().Add(time.Duration(10) * time.Second))
conn.SetDeadline(time.Now().Add(10 * time.Second))
return conn, nil
}
httpTransport := &http.Transport{
@ -801,7 +801,7 @@ func NewRegistry(authConfig *AuthConfig, factory *utils.HTTPRequestFactory, inde
if err != nil {
return nil, err
}
conn = utils.NewTimeoutConn(conn, time.Duration(1)*time.Minute)
conn = utils.NewTimeoutConn(conn, 1*time.Minute)
return conn, nil
}
}

View file

@ -264,7 +264,7 @@ func TestAddRequiredHeadersToRedirectedRequests(t *testing.T) {
AddRequiredHeadersToRedirectedRequests(reqTo, []*http.Request{reqFrom})
if len(reqTo.Header) != 1 {
t.Fatal("Expected 1 headers, got %d", len(reqTo.Header))
t.Fatalf("Expected 1 headers, got %d", len(reqTo.Header))
}
if reqTo.Header.Get("Content-Type") != "application/json" {
@ -288,7 +288,7 @@ func TestAddRequiredHeadersToRedirectedRequests(t *testing.T) {
AddRequiredHeadersToRedirectedRequests(reqTo, []*http.Request{reqFrom})
if len(reqTo.Header) != 2 {
t.Fatal("Expected 2 headers, got %d", len(reqTo.Header))
t.Fatalf("Expected 2 headers, got %d", len(reqTo.Header))
}
if reqTo.Header.Get("Content-Type") != "application/json" {