Update vendored deps, including AWS SDK, openpgp, ftp, ...

This commit is contained in:
Andrey Smirnov
2018-04-05 17:46:45 +03:00
parent cef4fefc40
commit 0e6ee35942
1497 changed files with 450721 additions and 68034 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ const opSearch = "Search"
// SearchRequest generates a "aws/request.Request" representing the
// client's request for the Search operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -110,7 +110,7 @@ const opSuggest = "Suggest"
// SuggestRequest generates a "aws/request.Request" representing the
// client's request for the Suggest operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -202,7 +202,7 @@ const opUploadDocuments = "UploadDocuments"
// UploadDocumentsRequest generates a "aws/request.Request" representing the
// client's request for the UploadDocuments operation. The "output" return
// value will be populated with the request's response once the request complets
// value will be populated with the request's response once the request completes
// successfuly.
//
// Use "Send" method on the returned Request to send the API call to the service.
@@ -3,8 +3,6 @@ package cloudsearchdomain_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/cloudsearchdomain"
@@ -18,9 +16,15 @@ func TestRequireEndpointIfRegionProvided(t *testing.T) {
req, _ := svc.SearchRequest(nil)
err := req.Build()
assert.Equal(t, "", svc.Endpoint)
assert.Error(t, err)
assert.Equal(t, aws.ErrMissingEndpoint, err)
if e, a := "", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err == nil {
t.Errorf("expect error, got none")
}
if e, a := aws.ErrMissingEndpoint, err; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
@@ -30,9 +34,15 @@ func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
req, _ := svc.SearchRequest(nil)
err := req.Build()
assert.Equal(t, "", svc.Endpoint)
assert.Error(t, err)
assert.Equal(t, aws.ErrMissingEndpoint, err)
if e, a := "", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err == nil {
t.Errorf("expect error, got none")
}
if e, a := aws.ErrMissingEndpoint, err; e != a {
t.Errorf("expect %v, got %v", e, a)
}
}
func TestRequireEndpointUsed(t *testing.T) {
@@ -44,6 +54,10 @@ func TestRequireEndpointUsed(t *testing.T) {
req, _ := svc.SearchRequest(nil)
err := req.Build()
assert.Equal(t, "https://endpoint", svc.Endpoint)
assert.NoError(t, err)
if e, a := "https://endpoint", svc.Endpoint; e != a {
t.Errorf("expect %v, got %v", e, a)
}
if err != nil {
t.Errorf("expect no error, got %v", err)
}
}
+1 -1
View File
@@ -19,7 +19,7 @@
//
// Using the Client
//
// To Amazon CloudSearch Domain with the SDK use the New function to create
// To contact Amazon CloudSearch Domain with the SDK use the New function to create
// a new service client. With that client you can make API requests to the service.
// These clients are safe to use concurrently.
//
+3 -3
View File
@@ -50,14 +50,14 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudSearchDomain {
} else {
c = p.ClientConfig(EndpointsID, cfgs...)
}
if c.SigningNameDerived || len(c.SigningName) == 0 {
c.SigningName = "cloudsearch"
}
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
}
// newClient creates, initializes and returns a new service client instance.
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *CloudSearchDomain {
if len(signingName) == 0 {
signingName = "cloudsearch"
}
svc := &CloudSearchDomain{
Client: client.New(
cfg,