Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
49
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
49
vendor/github.com/aws/aws-sdk-go/service/cloudsearchdomain/customizations_test.go
generated
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
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"
|
||||
)
|
||||
|
||||
func TestRequireEndpointIfRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "", svc.Endpoint)
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, aws.ErrMissingEndpoint, err)
|
||||
}
|
||||
|
||||
func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "", svc.Endpoint)
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, aws.ErrMissingEndpoint, err)
|
||||
}
|
||||
|
||||
func TestRequireEndpointUsed(t *testing.T) {
|
||||
svc := cloudsearchdomain.New(unit.Session, &aws.Config{
|
||||
Region: aws.String("mock-region"),
|
||||
DisableParamValidation: aws.Bool(true),
|
||||
Endpoint: aws.String("https://endpoint"),
|
||||
})
|
||||
req, _ := svc.SearchRequest(nil)
|
||||
err := req.Build()
|
||||
|
||||
assert.Equal(t, "https://endpoint", svc.Endpoint)
|
||||
assert.NoError(t, err)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue