mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-29 04:16:07 +00:00
Update vendored deps, including AWS SDK, openpgp, ftp, ...
This commit is contained in:
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# language: en
|
||||
@autoscalingplans @client
|
||||
Feature: AWS Auto Scaling Plans
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeScalingPlans" API
|
||||
Then the request should be successful
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// +build integration
|
||||
|
||||
//Package autoscalingplans provides gucumber integration tests support.
|
||||
package autoscalingplans
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/autoscalingplans"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@autoscalingplans", func() {
|
||||
gucumber.World["client"] = autoscalingplans.New(smoke.Session)
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// +build integration
|
||||
|
||||
//Package cloudhsmv2 provides gucumber integration tests support.
|
||||
package cloudhsmv2
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/cloudhsmv2"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@cloudhsmv2", func() {
|
||||
gucumber.World["client"] = cloudhsmv2.New(smoke.Session)
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# language: en
|
||||
@cloudhsmv2 @client
|
||||
Feature: Amazon CloudHSMv2
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "DescribeBackups" API
|
||||
Then the request should be successful
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// +build integration
|
||||
|
||||
//Package mediastore provides gucumber integration tests support.
|
||||
package mediastore
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/mediastore"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@mediastore", func() {
|
||||
gucumber.World["client"] = mediastore.New(smoke.Session)
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# language: en
|
||||
@mediastore @client
|
||||
Feature: AWS Elemental MediaStore
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListContainers" API
|
||||
Then the request should be successful
|
||||
Generated
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
// +build integration
|
||||
|
||||
//Package mediastoredata provides gucumber integration tests support.
|
||||
package mediastoredata
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/mediastore"
|
||||
"github.com/aws/aws-sdk-go/service/mediastoredata"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
const containerName = "awsgosdkteamintegcontainer"
|
||||
|
||||
gucumber.Before("@mediastoredata", func() {
|
||||
mediastoreSvc := mediastore.New(smoke.Session)
|
||||
|
||||
resp, err := mediastoreSvc.DescribeContainer(&mediastore.DescribeContainerInput{
|
||||
ContainerName: aws.String(containerName),
|
||||
})
|
||||
if err != nil {
|
||||
gucumber.World["error"] = fmt.Errorf("failed to get mediastore container endpoint for test, %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
gucumber.World["client"] = mediastoredata.New(smoke.Session, &aws.Config{
|
||||
Endpoint: resp.Container.Endpoint,
|
||||
})
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# language: en
|
||||
@mediastoredata @client
|
||||
Feature: AWS Elemental MediaStore Data Plane
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListItems" API
|
||||
Then the request should be successful
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// +build integration
|
||||
|
||||
//Package mobile provides gucumber integration tests support.
|
||||
package mobile
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/mobile"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@mobile", func() {
|
||||
gucumber.World["client"] = mobile.New(smoke.Session)
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
# language: en
|
||||
@mobile @client
|
||||
Feature: AWS Mobile
|
||||
|
||||
Scenario: Making a request
|
||||
When I call the "ListBundles" API
|
||||
Then the request should be successful
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
// +build integration
|
||||
|
||||
//Package sagemakerruntime provides gucumber integration tests support.
|
||||
package sagemakerruntime
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
|
||||
"github.com/aws/aws-sdk-go/service/sagemakerruntime"
|
||||
"github.com/gucumber/gucumber"
|
||||
)
|
||||
|
||||
func init() {
|
||||
gucumber.Before("@sagemakerruntime", func() {
|
||||
gucumber.World["client"] = sagemakerruntime.New(smoke.Session)
|
||||
})
|
||||
}
|
||||
Generated
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
# language: en
|
||||
@sagemakerruntime @client
|
||||
Feature: Amazon SageMaker Runtime
|
||||
|
||||
Scenario: Making a request
|
||||
When I attempt to call the "InvokeEndpoint" API with JSON:
|
||||
"""
|
||||
{"EndpointName": "fake-endpoint", "Body": [123, 125]}
|
||||
"""
|
||||
Then I expect the response error code to be "ValidationError"
|
||||
+62
-24
@@ -5,7 +5,6 @@ package smoke
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
@@ -13,7 +12,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/gucumber/gucumber"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||
@@ -47,12 +45,16 @@ func init() {
|
||||
|
||||
gucumber.Then(`^the value at "(.+?)" should be a list$`, func(member string) {
|
||||
vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
|
||||
assert.NotNil(gucumber.T, vals)
|
||||
if vals == nil {
|
||||
gucumber.T.Errorf("expect not nil, was")
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.Then(`^the response should contain a "(.+?)"$`, func(member string) {
|
||||
vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
|
||||
assert.NotEmpty(gucumber.T, vals)
|
||||
if len(vals) == 0 {
|
||||
gucumber.T.Errorf("expect values, got none")
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) {
|
||||
@@ -61,23 +63,33 @@ func init() {
|
||||
|
||||
gucumber.Then(`^I expect the response error code to be "(.+?)"$`, func(code string) {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if ok {
|
||||
assert.Equal(gucumber.T, code, err.Code(), "Error: %v", err)
|
||||
if e, a := code, err.Code(); e != a {
|
||||
gucumber.T.Errorf("Error: %v", err)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.And(`^I expect the response error message to include:$`, func(data string) {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if ok {
|
||||
assert.Contains(gucumber.T, err.Error(), data)
|
||||
if a := err.Error(); len(a) == 0 {
|
||||
gucumber.T.Errorf("expect string length to be greater than zero")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.And(`^I expect the response error message to include one of:$`, func(table [][]string) {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if ok {
|
||||
found := false
|
||||
for _, row := range table {
|
||||
@@ -87,14 +99,20 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
assert.True(gucumber.T, found, fmt.Sprintf("no error messages matched: \"%s\"", err.Error()))
|
||||
if !found {
|
||||
gucumber.T.Errorf("no error messages matched: \"%s\"", err.Error())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.And(`^I expect the response error message not be empty$`, func() {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
assert.NotEmpty(gucumber.T, err.Message())
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if len(err.Message()) == 0 {
|
||||
gucumber.T.Errorf("expect values, got none")
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.When(`^I call the "(.+?)" API with JSON:$`, func(s1 string, data string) {
|
||||
@@ -107,26 +125,42 @@ func init() {
|
||||
|
||||
gucumber.Then(`^the error code should be "(.+?)"$`, func(s1 string) {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
assert.Equal(gucumber.T, s1, err.Code())
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if e, a := s1, err.Code(); e != a {
|
||||
gucumber.T.Errorf("expect %v, got %v", e, a)
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.And(`^the error message should contain:$`, func(data string) {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
assert.Contains(gucumber.T, err.Error(), data)
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if a := err.Error(); len(a) == 0 {
|
||||
gucumber.T.Errorf("expect string length to be greater than zero")
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.Then(`^the request should fail$`, func() {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.True(gucumber.T, ok, "no error returned")
|
||||
assert.Error(gucumber.T, err)
|
||||
if !ok {
|
||||
gucumber.T.Errorf("no error returned")
|
||||
}
|
||||
if err == nil {
|
||||
gucumber.T.Errorf("expect error, got none")
|
||||
}
|
||||
})
|
||||
|
||||
gucumber.Then(`^the request should be successful$`, func() {
|
||||
err, ok := gucumber.World["error"].(awserr.Error)
|
||||
assert.False(gucumber.T, ok, "error returned")
|
||||
assert.NoError(gucumber.T, err)
|
||||
if ok {
|
||||
gucumber.T.Errorf("error returned")
|
||||
}
|
||||
if err != nil {
|
||||
gucumber.T.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -160,10 +194,12 @@ func call(op string, args [][]string, allowError bool) {
|
||||
|
||||
if !allowError {
|
||||
err, _ := gucumber.World["error"].(error)
|
||||
assert.NoError(gucumber.T, err)
|
||||
if err != nil {
|
||||
gucumber.T.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
assert.Fail(gucumber.T, "failed to find operation "+op)
|
||||
gucumber.T.Errorf("failed to find operation " + op)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,10 +251,12 @@ func callWithJSON(op, j string, allowError bool) {
|
||||
|
||||
if !allowError {
|
||||
err, _ := gucumber.World["error"].(error)
|
||||
assert.NoError(gucumber.T, err)
|
||||
if err != nil {
|
||||
gucumber.T.Errorf("expect no error, got %v", err)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
assert.Fail(gucumber.T, "failed to find operation "+op)
|
||||
gucumber.T.Errorf("failed to find operation " + op)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user