mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Update vendored deps, including AWS SDK, openpgp, ftp, ...
This commit is contained in:
+7
-4
@@ -1,12 +1,11 @@
|
||||
package rdsutils_test
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"testing"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/credentials"
|
||||
"github.com/aws/aws-sdk-go/service/rds/rdsutils"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestBuildAuthToken(t *testing.T) {
|
||||
@@ -33,7 +32,11 @@ func TestBuildAuthToken(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
creds := credentials.NewStaticCredentials("AKID", "SECRET", "SESSION")
|
||||
url, err := rdsutils.BuildAuthToken(c.endpoint, c.region, c.user, creds)
|
||||
assert.NoError(t, err)
|
||||
assert.Regexp(t, c.expectedRegex, url)
|
||||
if err != nil {
|
||||
t.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
if re, a := regexp.MustCompile(c.expectedRegex), url; !re.MatchString(a) {
|
||||
t.Errorf("expect %s to match %s", re, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user