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:
+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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user