mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-08 22:30:41 +00:00
Update vendored deps, including AWS SDK, openpgp, ftp, ...
This commit is contained in:
+4
-4
@@ -14,7 +14,7 @@ const opDeleteThingShadow = "DeleteThingShadow"
|
||||
|
||||
// DeleteThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the DeleteThingShadow 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.
|
||||
@@ -114,7 +114,7 @@ const opGetThingShadow = "GetThingShadow"
|
||||
|
||||
// GetThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the GetThingShadow 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.
|
||||
@@ -214,7 +214,7 @@ const opPublish = "Publish"
|
||||
|
||||
// PublishRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the Publish 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.
|
||||
@@ -304,7 +304,7 @@ const opUpdateThingShadow = "UpdateThingShadow"
|
||||
|
||||
// UpdateThingShadowRequest generates a "aws/request.Request" representing the
|
||||
// client's request for the UpdateThingShadow 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.
|
||||
|
||||
+24
-10
@@ -4,8 +4,6 @@ import (
|
||||
"fmt"
|
||||
"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/iotdataplane"
|
||||
@@ -19,9 +17,15 @@ func TestRequireEndpointIfRegionProvided(t *testing.T) {
|
||||
req, _ := svc.GetThingShadowRequest(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) {
|
||||
@@ -33,9 +37,15 @@ func TestRequireEndpointIfNoRegionProvided(t *testing.T) {
|
||||
req, _ := svc.GetThingShadowRequest(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) {
|
||||
@@ -47,6 +57,10 @@ func TestRequireEndpointUsed(t *testing.T) {
|
||||
req, _ := svc.GetThingShadowRequest(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
@@ -15,7 +15,7 @@
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS IoT Data Plane with the SDK use the New function to create
|
||||
// To contact AWS IoT Data Plane 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
@@ -50,14 +50,14 @@ func New(p client.ConfigProvider, cfgs ...*aws.Config) *IoTDataPlane {
|
||||
} else {
|
||||
c = p.ClientConfig(EndpointsID, cfgs...)
|
||||
}
|
||||
if c.SigningNameDerived || len(c.SigningName) == 0 {
|
||||
c.SigningName = "iotdata"
|
||||
}
|
||||
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) *IoTDataPlane {
|
||||
if len(signingName) == 0 {
|
||||
signingName = "iotdata"
|
||||
}
|
||||
svc := &IoTDataPlane{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
|
||||
Reference in New Issue
Block a user