Conver to regular Go vendor + dep tool

This commit is contained in:
Andrey Smirnov
2017-03-22 17:38:32 +03:00
parent 070347295e
commit c6c1012330
3260 changed files with 1742550 additions and 72 deletions
@@ -0,0 +1,14 @@
#language en
@acm @client
Feature: AWS Certificate Manager
Scenario: Making a request
When I call the "ListCertificates" API
Then the request should be successful
Scenario: Handling errors
When I attempt to call the "GetCertificate" API with:
| CertificateArn | arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012 |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message not be empty
@@ -0,0 +1,16 @@
// +build integration
//Package acm provides gucumber integration tests support.
package acm
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/acm"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@acm", func() {
gucumber.World["client"] = acm.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@apigateway @client
Feature: Amazon API Gateway
Scenario: Making a request
When I call the "GetAccountRequest" API
Then the request should be successful
Scenario: Handing errors
When I attempt to call the "GetRestApi" API with:
| RestApiId | api123 |
Then I expect the response error code to be "NotFoundException"
And I expect the response error message to include:
"""
Invalid REST API identifier specified
"""
@@ -0,0 +1,16 @@
// +build integration
//Package apigateway provides gucumber integration tests support.
package apigateway
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/apigateway"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@apigateway", func() {
gucumber.World["client"] = apigateway.New(smoke.Session)
})
}
@@ -0,0 +1,8 @@
#language en
@applicationdiscoveryservice @client
Feature: AWS Application Discovery Service
Scenario: Making a request
When I call the "DescribeAgents" API
Then the request should be successful
@@ -0,0 +1,19 @@
// +build integration
//Package applicationdiscoveryservice provides gucumber integration tests support.
package applicationdiscoveryservice
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@applicationdiscoveryservice", func() {
gucumber.World["client"] = applicationdiscoveryservice.New(
smoke.Session, &aws.Config{Region: aws.String("us-west-2")},
)
})
}
@@ -0,0 +1,18 @@
# language: en
@autoscaling @client
Feature: Auto Scaling
Scenario: Making a request
When I call the "DescribeScalingProcessTypes" API
Then the value at "Processes" should be a list
Scenario: Handing errors
When I attempt to call the "CreateLaunchConfiguration" API with:
| LaunchConfigurationName | |
| ImageId | ami-12345678 |
| InstanceType | m1.small |
Then I expect the response error code to be "InvalidParameter"
And I expect the response error message to include:
"""
LaunchConfigurationName
"""
@@ -0,0 +1,16 @@
// +build integration
//Package autoscaling provides gucumber integration tests support.
package autoscaling
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@autoscaling", func() {
gucumber.World["client"] = autoscaling.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
// +build integration
//Package cloudformation provides gucumber integration tests support.
package cloudformation
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudformation", func() {
gucumber.World["client"] = cloudformation.New(smoke.Session)
})
}
@@ -0,0 +1,17 @@
# language: en
@cloudformation @client
Feature: AWS CloudFormation
Scenario: Making a request
When I call the "ListStacks" API
Then the value at "StackSummaries" should be a list
Scenario: Handling errors
When I attempt to call the "CreateStack" API with:
| StackName | fakestack |
| TemplateURL | http://s3.amazonaws.com/foo/bar |
Then I expect the response error code to be "ValidationError"
And I expect the response error message to include:
"""
TemplateURL must reference a valid S3 object to which you have access.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cloudfront provides gucumber integration tests support.
package cloudfront
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudfront"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudfront", func() {
gucumber.World["client"] = cloudfront.New(smoke.Session)
})
}
@@ -0,0 +1,17 @@
# language: en
@cloudfront @client
Feature: Amazon CloudFront
Scenario: Making a basic request
When I call the "ListDistributions" API with:
| MaxItems | 1 |
Then the value at "DistributionList.Items" should be a list
Scenario: Error handling
When I attempt to call the "GetDistribution" API with:
| Id | fake-id |
Then I expect the response error code to be "NoSuchDistribution"
And I expect the response error message to include:
"""
The specified distribution does not exist.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cloudhsm provides gucumber integration tests support.
package cloudhsm
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudhsm"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudhsm", func() {
gucumber.World["client"] = cloudhsm.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@cloudhsm @client
Feature: Amazon CloudHSM
Scenario: Making a request
When I call the "ListHapgs" API
Then the value at "HapgList" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeHapg" API with:
| HapgArn | bogus-arn |
Then I expect the response error code to be "ValidationException"
And I expect the response error message to include:
"""
Value 'bogus-arn' at 'hapgArn' failed to satisfy constraint
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cloudsearch provides gucumber integration tests support.
package cloudsearch
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudsearch"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudsearch", func() {
gucumber.World["client"] = cloudsearch.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@cloudsearch @client
Feature: Amazon CloudSearch
Scenario: Making a request
When I call the "DescribeDomains" API
Then the response should contain a "DomainStatusList"
Scenario: Handling errors
When I attempt to call the "DescribeIndexFields" API with:
| DomainName | fakedomain |
Then I expect the response error code to be "ResourceNotFound"
And I expect the response error message to include:
"""
Domain not found: fakedomain
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cloudtrail provides gucumber integration tests support.
package cloudtrail
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudtrail"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudtrail", func() {
gucumber.World["client"] = cloudtrail.New(smoke.Session)
})
}
@@ -0,0 +1,12 @@
# language: en
@cloudtrail @client
Feature: AWS CloudTrail
Scenario: Making a request
When I call the "DescribeTrails" API
Then the request should be successful
Scenario: Handling errors
When I attempt to call the "DeleteTrail" API with:
| Name | faketrail |
Then I expect the response error code to be "TrailNotFoundException"
@@ -0,0 +1,16 @@
// +build integration
//Package cloudwatch provides gucumber integration tests support.
package cloudwatch
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudwatch"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudwatch", func() {
gucumber.World["client"] = cloudwatch.New(smoke.Session)
})
}
@@ -0,0 +1,19 @@
# language: en
@cloudwatch @monitoring @client
Feature: Amazon CloudWatch
Scenario: Making a request
When I call the "ListMetrics" API with:
| Namespace | AWS/EC2 |
Then the value at "Metrics" should be a list
Scenario: Handling errors
When I attempt to call the "SetAlarmState" API with:
| AlarmName | abc |
| StateValue | mno |
| StateReason | xyz |
Then I expect the response error code to be "ValidationError"
And I expect the response error message to include:
"""
failed to satisfy constraint
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cloudwatchlogs provides gucumber integration tests support.
package cloudwatchlogs
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cloudwatchlogs", func() {
gucumber.World["client"] = cloudwatchlogs.New(smoke.Session)
})
}
@@ -0,0 +1,17 @@
# language: en
@cloudwatchlogs @logs
Feature: Amazon CloudWatch Logs
Scenario: Making a request
When I call the "DescribeLogGroups" API
Then the value at "logGroups" should be a list
Scenario: Handling errors
When I attempt to call the "GetLogEvents" API with:
| logGroupName | fakegroup |
| logStreamName | fakestream |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
The specified log group does not exist.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package codecommit provides gucumber integration tests support.
package codecommit
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/codecommit"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@codecommit", func() {
gucumber.World["client"] = codecommit.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@codecommit @client
Feature: Amazon CodeCommit
Scenario: Making a request
When I call the "ListRepositories" API
Then the value at "repositories" should be a list
Scenario: Handling errors
When I attempt to call the "ListBranches" API with:
| repositoryName | fake-repo |
Then I expect the response error code to be "RepositoryDoesNotExistException"
And I expect the response error message to include:
"""
fake-repo does not exist
"""
@@ -0,0 +1,16 @@
// +build integration
//Package codedeploy provides gucumber integration tests support.
package codedeploy
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/codedeploy"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@codedeploy", func() {
gucumber.World["client"] = codedeploy.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@codedeploy @client
Feature: Amazon CodeDeploy
Scenario: Making a request
When I call the "ListApplications" API
Then the value at "applications" should be a list
Scenario: Handling errors
When I attempt to call the "GetDeployment" API with:
| deploymentId | d-USUAELQEX |
Then I expect the response error code to be "DeploymentDoesNotExistException"
And I expect the response error message to include:
"""
The deployment d-USUAELQEX could not be found
"""
@@ -0,0 +1,16 @@
// +build integration
//Package codepipeline provides gucumber integration tests support.
package codepipeline
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/codepipeline"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@codepipeline", func() {
gucumber.World["client"] = codepipeline.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@codepipeline @client
Feature: Amazon CodePipeline
Scenario: Making a request
When I call the "ListPipelines" API
Then the value at "pipelines" should be a list
Scenario: Handling errors
When I attempt to call the "GetPipeline" API with:
| name | fake-pipeline |
Then I expect the response error code to be "PipelineNotFoundException"
And I expect the response error message to include:
"""
does not have a pipeline with name 'fake-pipeline'
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cognitoidentity provides gucumber integration tests support.
package cognitoidentity
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cognitoidentity"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cognitoidentity", func() {
gucumber.World["client"] = cognitoidentity.New(smoke.Session)
})
}
@@ -0,0 +1,19 @@
# language: en
@cognitoidentity @client
Feature: Amazon Cognito Idenity
Scenario: Making a request
When I call the "ListIdentityPools" API with JSON:
"""
{"MaxResults": 10}
"""
Then the value at "IdentityPools" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeIdentityPool" API with:
| IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
"""
@@ -0,0 +1,16 @@
// +build integration
//Package cognitosync provides gucumber integration tests support.
package cognitosync
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/cognitosync"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@cognitosync", func() {
gucumber.World["client"] = cognitosync.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@cognitosync @client
Feature: Amazon Cognito Sync
Scenario: Making a request
When I call the "ListIdentityPoolUsage" API
Then the value at "IdentityPoolUsages" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeIdentityPoolUsage" API with:
| IdentityPoolId | us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
IdentityPool 'us-east-1:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' not found
"""
@@ -0,0 +1,16 @@
// +build integration
//Package configservice provides gucumber integration tests support.
package configservice
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/configservice"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@configservice", func() {
gucumber.World["client"] = configservice.New(smoke.Session)
})
}
@@ -0,0 +1,17 @@
# language: en
@configservice @config @client
Feature: AWS Config
Scenario: Making a request
When I call the "DescribeConfigurationRecorders" API
Then the value at "ConfigurationRecorders" should be a list
Scenario: Handling errors
When I attempt to call the "GetResourceConfigHistory" API with:
| resourceType | fake-type |
| resourceId | fake-id |
Then I expect the response error code to be "ValidationException"
And I expect the response error message to include:
"""
failed to satisfy constraint
"""
@@ -0,0 +1,16 @@
// +build integration
//Package datapipeline provides gucumber integration tests support.
package datapipeline
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/datapipeline"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@datapipeline", func() {
gucumber.World["client"] = datapipeline.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@datapipeline @client
Feature: AWS Data Pipeline
Scenario: Making a request
When I call the "ListPipelines" API
Then the response should contain a "pipelineIdList"
Scenario: Handling errors
When I attempt to call the "GetPipelineDefinition" API with:
| pipelineId | fake-id |
Then I expect the response error code to be "PipelineNotFoundException"
And I expect the response error message to include:
"""
does not exist
"""
@@ -0,0 +1,19 @@
// +build integration
//Package devicefarm provides gucumber integration tests support.
package devicefarm
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/devicefarm"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@devicefarm", func() {
// FIXME remove custom region
gucumber.World["client"] = devicefarm.New(smoke.Session,
aws.NewConfig().WithRegion("us-west-2"))
})
}
@@ -0,0 +1,16 @@
# language: en
@devicefarm @client
Feature: AWS Device Farm
Scenario: Making a request
When I call the "ListDevices" API
Then the value at "devices" should be a list
Scenario: Handling errors
When I attempt to call the "GetDevice" API with:
| arn | arn:aws:devicefarm:us-west-2::device:000000000000000000000000fake-arn |
Then I expect the response error code to be "NotFoundException"
And I expect the response error message to include:
"""
No device was found for arn
"""
@@ -0,0 +1,16 @@
// +build integration
//Package directconnect provides gucumber integration tests support.
package directconnect
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/directconnect"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@directconnect", func() {
gucumber.World["client"] = directconnect.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@directconnect @client
Feature: AWS Direct Connect
Scenario: Making a request
When I call the "DescribeConnections" API
Then the value at "connections" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeConnections" API with:
| connectionId | fake-connection |
Then I expect the response error code to be "DirectConnectClientException"
And I expect the response error message to include:
"""
Connection ID fake-connection has an invalid format
"""
@@ -0,0 +1,16 @@
// +build integration
//Package directoryservice provides gucumber integration tests support.
package directoryservice
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/directoryservice"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@directoryservice", func() {
gucumber.World["client"] = directoryservice.New(smoke.Session)
})
}
@@ -0,0 +1,17 @@
# language: en
@directoryservice @ds @client
Feature: AWS Directory Service
I want to use AWS Directory Service
Scenario: Making a request
When I call the "DescribeDirectories" API
Then the value at "DirectoryDescriptions" should be a list
Scenario: Handling errors
When I attempt to call the "CreateDirectory" API with:
| Name | |
| Password | |
| Size | |
Then I expect the response error code to be "ValidationException"
@@ -0,0 +1,16 @@
// +build integration
//Package dynamodb provides gucumber integration tests support.
package dynamodb
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@dynamodb", func() {
gucumber.World["client"] = dynamodb.New(smoke.Session)
})
}
@@ -0,0 +1,19 @@
# language: en
@dynamodb @client
Feature: Amazon DynamoDB
Scenario: Making a request
When I call the "ListTables" API with JSON:
"""
{"Limit": 1}
"""
Then the value at "TableNames" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeTable" API with:
| TableName | fake-table |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
Requested resource not found: Table: fake-table not found
"""
@@ -0,0 +1,16 @@
// +build integration
//Package dynamodbstreams provides gucumber integration tests support.
package dynamodbstreams
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/dynamodbstreams"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@dynamodbstreams", func() {
gucumber.World["client"] = dynamodbstreams.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@dynamodbstreams @client
Feature: Amazon DynamoDB Streams
Scenario: Making a request
When I call the "ListStreams" API
Then the value at "Streams" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeStream" API with:
| StreamArn | fake-stream |
Then I expect the response error code to be "InvalidParameter"
And I expect the response error message to include:
"""
StreamArn
"""
@@ -0,0 +1,16 @@
// +build integration
//Package ec2 provides gucumber integration tests support.
package ec2
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@ec2", func() {
gucumber.World["client"] = ec2.New(smoke.Session)
})
}
@@ -0,0 +1,18 @@
# language: en
@ec2 @client
Feature: Amazon Elastic Compute Cloud
Scenario: Making a request
When I call the "DescribeRegions" API
Then the value at "Regions" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeInstances" API with JSON:
"""
{"InstanceIds": ["i-12345678"]}
"""
Then I expect the response error code to be "InvalidInstanceID.NotFound"
And I expect the response error message to include:
"""
The instance ID 'i-12345678' does not exist
"""
@@ -0,0 +1,19 @@
// +build integration
//Package ecs provides gucumber integration tests support.
package ecs
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/ecs"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@ecs", func() {
// FIXME remove custom region
gucumber.World["client"] = ecs.New(smoke.Session,
aws.NewConfig().WithRegion("us-west-2"))
})
}
@@ -0,0 +1,14 @@
# language: en
@ecs @client
Feature: Amazon ECS
I want to use Amazon ECS
Scenario: Making a request
When I call the "ListClusters" API
Then the value at "clusterArns" should be a list
Scenario: Handling errors
When I attempt to call the "StopTask" API with:
| task | xxxxxxxxxxx-xxxxxxxxxxxx-xxxxxxxxxxx |
Then the error code should be "ClusterNotFoundException"
@@ -0,0 +1,19 @@
// +build integration
//Package efs provides gucumber integration tests support.
package efs
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/efs"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@efs", func() {
// FIXME remove custom region
gucumber.World["client"] = efs.New(smoke.Session,
aws.NewConfig().WithRegion("us-west-2"))
})
}
@@ -0,0 +1,14 @@
# language: en
@efs @elasticfilesystem @client
Feature: Amazon Elastic File System
I want to use Amazon Elastic File System
Scenario: Making a request
When I call the "DescribeFileSystems" API
Then the value at "FileSystems" should be a list
Scenario: Handling errors
When I attempt to call the "DeleteFileSystem" API with:
| FileSystemId | fake-id |
Then the error code should be "BadRequest"
@@ -0,0 +1,16 @@
// +build integration
//Package elasticache provides gucumber integration tests support.
package elasticache
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/elasticache"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@elasticache", func() {
gucumber.World["client"] = elasticache.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@elasticache @client
Feature: ElastiCache
Scenario: Making a request
When I call the "DescribeEvents" API
Then the value at "Events" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeCacheClusters" API with:
| CacheClusterId | fake_cluster |
Then I expect the response error code to be "InvalidParameterValue"
And I expect the response error message to include:
"""
The parameter CacheClusterIdentifier is not a valid identifier.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package elasticbeanstalk provides gucumber integration tests support.
package elasticbeanstalk
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/elasticbeanstalk"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@elasticbeanstalk", func() {
gucumber.World["client"] = elasticbeanstalk.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@elasticbeanstalk @client
Feature: AWS Elastic Beanstalk
Scenario: Making a request
When I call the "ListAvailableSolutionStacks" API
Then the value at "SolutionStacks" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeEnvironmentResources" API with:
| EnvironmentId | fake_environment |
Then I expect the response error code to be "InvalidParameterValue"
And I expect the response error message to include:
"""
No Environment found for EnvironmentId = 'fake_environment'.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package elasticloadbalancing provides gucumber integration tests support.
package elasticloadbalancing
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/elb"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@elasticloadbalancing", func() {
gucumber.World["client"] = elb.New(smoke.Session)
})
}
@@ -0,0 +1,18 @@
# language: en
@elasticloadbalancing @client
Feature: Elastic Load Balancing
Scenario: Making a request
When I call the "DescribeLoadBalancers" API
Then the value at "LoadBalancerDescriptions" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeLoadBalancers" API with JSON:
"""
{"LoadBalancerNames": ["fake_load_balancer"]}
"""
Then I expect the response error code to be "ValidationError"
And I expect the response error message to include:
"""
LoadBalancer name cannot contain characters that are not letters, or digits or the dash.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package elastictranscoder provides gucumber integration tests support.
package elastictranscoder
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/elastictranscoder"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@elastictranscoder", func() {
gucumber.World["client"] = elastictranscoder.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@elastictranscoder @client
Feature: Amazon Elastic Transcoder
Scenario: Making a request
When I call the "ListPresets" API
Then the value at "Presets" should be a list
Scenario: Handling errors
When I attempt to call the "ReadJob" API with:
| Id | fake_job |
Then I expect the response error code to be "ValidationException"
And I expect the response error message to include:
"""
Value 'fake_job' at 'id' failed to satisfy constraint
"""
@@ -0,0 +1,16 @@
// +build integration
//Package emr provides gucumber integration tests support.
package emr
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/emr"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@emr", func() {
gucumber.World["client"] = emr.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@emr @client @elasticmapreduce
Feature: Amazon EMR
Scenario: Making a request
When I call the "ListClusters" API
Then the value at "Clusters" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeCluster" API with:
| ClusterId | fake_cluster |
Then I expect the response error code to be "InvalidRequestException"
And I expect the response error message to include:
"""
Cluster id 'fake_cluster' is not valid.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package es provides gucumber integration tests support.
package es
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/elasticsearchservice"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@es", func() {
gucumber.World["client"] = elasticsearchservice.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@es @elasticsearchservice
Feature: Amazon ElasticsearchService
Scenario: Making a request
When I call the "ListDomainNames" API
Then the value at "DomainNames" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeElasticsearchDomain" API with:
| DomainName | not-a-domain |
Then the error code should be "ResourceNotFoundException"
And I expect the response error message to include:
"""
Domain not found: not-a-domain
"""
@@ -0,0 +1,16 @@
// +build integration
//Package glacier provides gucumber integration tests support.
package glacier
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/glacier"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@glacier", func() {
gucumber.World["client"] = glacier.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@glacier @client
Feature: Amazon Glacier
Scenario: Making a request
When I call the "ListVaults" API
Then the response should contain a "VaultList"
Scenario: Handling errors
When I attempt to call the "ListVaults" API with:
| accountId | abcmnoxyz |
Then I expect the response error code to be "UnrecognizedClientException"
And I expect the response error message to include:
"""
No account found for the given parameters
"""
@@ -0,0 +1,16 @@
// +build integration
//Package iam provides gucumber integration tests support.
package iam
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/iam"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@iam", func() {
gucumber.World["client"] = iam.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@iam @client
Feature: AWS Identity and Access Management
Scenario: Making a request
When I call the "ListUsers" API
Then the value at "Users" should be a list
Scenario: Handling errors
When I attempt to call the "GetUser" API with:
| UserName | fake_user |
Then I expect the response error code to be "NoSuchEntity"
And I expect the response error message to include:
"""
The user with name fake_user cannot be found.
"""
@@ -0,0 +1,29 @@
// +build integration
//Package iotdataplane provides gucumber integration tests support.
package iotdataplane
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/iot"
"github.com/aws/aws-sdk-go/service/iotdataplane"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@iotdataplane", func() {
svc := iot.New(smoke.Session)
result, err := svc.DescribeEndpoint(&iot.DescribeEndpointInput{})
if err != nil {
gucumber.World["error"] = err
return
}
fmt.Println("IOT Data endpoint:", *result.EndpointAddress)
gucumber.World["client"] = iotdataplane.New(smoke.Session, aws.NewConfig().
WithEndpoint(*result.EndpointAddress))
})
}
@@ -0,0 +1,9 @@
# language: en
@iotdataplane @client
Feature: AWS IoT Data Plane
Scenario: Handling errors
When I attempt to call the "GetThingShadow" API with:
| thingName | fake-thing |
Then I expect the response error code to be "ResourceNotFoundException"
@@ -0,0 +1,16 @@
// +build integration
//Package kinesis provides gucumber integration tests support.
package kinesis
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/kinesis"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@kinesis", func() {
gucumber.World["client"] = kinesis.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@kinesis @client
Feature: AWS Kinesis
Scenario: Making a request
When I call the "ListStreams" API
Then the value at "StreamNames" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeStream" API with:
| StreamName | bogus-stream-name |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
Stream bogus-stream-name under account
"""
@@ -0,0 +1,16 @@
// +build integration
//Package kms provides gucumber integration tests support.
package kms
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/kms"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@kms", func() {
gucumber.World["client"] = kms.New(smoke.Session)
})
}
@@ -0,0 +1,13 @@
# language: en
@kms @client
Feature: Amazon Key Management Service
Scenario: Making a request
When I call the "ListAliases" API
Then the value at "Aliases" should be a list
Scenario: Handling errors
When I attempt to call the "GetKeyPolicy" API with:
| KeyId | fake-key |
| PolicyName | fakepolicy |
Then I expect the response error code to be "NotFoundException"
@@ -0,0 +1,16 @@
// +build integration
//Package lambda provides gucumber integration tests support.
package lambda
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/lambda"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@lambda", func() {
gucumber.World["client"] = lambda.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@lambda @client
Feature: Amazon Lambda
Scenario: Making a request
When I call the "ListFunctions" API
Then the value at "Functions" should be a list
Scenario: Handling errors
When I attempt to call the "Invoke" API with:
| FunctionName | bogus-function |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
Function not found
"""
@@ -0,0 +1,16 @@
// +build integration
//Package machinelearning provides gucumber integration tests support.
package machinelearning
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/machinelearning"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@machinelearning", func() {
gucumber.World["client"] = machinelearning.New(smoke.Session)
})
}
@@ -0,0 +1,18 @@
# language: en
@machinelearning @client
Feature: Amazon Machine Learning
I want to use Amazon Machine Learning
Scenario: Making a request
When I call the "DescribeMLModels" API
Then the value at "Results" should be a list
Scenario: Error handling
When I attempt to call the "GetBatchPrediction" API with:
| BatchPredictionId | fake-id |
Then the error code should be "ResourceNotFoundException"
And the error message should contain:
"""
No BatchPrediction with id fake-id exists
"""
@@ -0,0 +1,16 @@
// +build integration
//Package opsworks provides gucumber integration tests support.
package opsworks
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/opsworks"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@opsworks", func() {
gucumber.World["client"] = opsworks.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@opsworks @client
Feature: AWS OpsWorks
Scenario: Making a request
When I call the "DescribeStacks" API
Then the value at "Stacks" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeLayers" API with:
| StackId | fake_stack |
Then I expect the response error code to be "ResourceNotFoundException"
And I expect the response error message to include:
"""
Unable to find stack with ID fake_stack
"""
@@ -0,0 +1,16 @@
// +build integration
//Package rds provides gucumber integration tests support.
package rds
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/rds"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@rds", func() {
gucumber.World["client"] = rds.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@rds @client
Feature: Amazon RDS
Scenario: Making a request
When I call the "DescribeDBEngineVersions" API
Then the value at "DBEngineVersions" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeDBInstances" API with:
| DBInstanceIdentifier | fake-id |
Then I expect the response error code to be "DBInstanceNotFound"
And I expect the response error message to include:
"""
DBInstance fake-id not found.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package redshift provides gucumber integration tests support.
package redshift
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/redshift"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@redshift", func() {
gucumber.World["client"] = redshift.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@redshift @client
Feature: Amazon Redshift
Scenario: Making a request
When I call the "DescribeClusterVersions" API
Then the value at "ClusterVersions" should be a list
Scenario: Handling errors
When I attempt to call the "DescribeClusters" API with:
| ClusterIdentifier | fake-cluster |
Then I expect the response error code to be "ClusterNotFound"
And I expect the response error message to include:
"""
Cluster fake-cluster not found.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package route53 provides gucumber integration tests support.
package route53
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@route53", func() {
gucumber.World["client"] = route53.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@route53 @client
Feature: Amazon Route 53
Scenario: Making a request
When I call the "ListHostedZones" API
Then the value at "HostedZones" should be a list
Scenario: Handling errors
When I attempt to call the "GetHostedZone" API with:
| Id | fake-zone |
Then I expect the response error code to be "NoSuchHostedZone"
And I expect the response error message to include:
"""
No hosted zone found with ID: fake-zone
"""
@@ -0,0 +1,16 @@
// +build integration
//Package route53domains provides gucumber integration tests support.
package route53domains
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/route53domains"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@route53domains", func() {
gucumber.World["client"] = route53domains.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@route53domains @client
Feature: Amazon Route53 Domains
Scenario: Making a request
When I call the "ListDomains" API
Then the value at "Domains" should be a list
Scenario: Handling errors
When I attempt to call the "GetDomainDetail" API with:
| DomainName | fake-domain-name |
Then I expect the response error code to be "InvalidInput"
And I expect the response error message to include:
"""
domain name must contain more than 1 label
"""
@@ -0,0 +1,16 @@
// +build integration
//Package ses provides gucumber integration tests support.
package ses
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/ses"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@ses", func() {
gucumber.World["client"] = ses.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@ses @email @client
Feature: Amazon Simple Email Service
Scenario: Making a request
When I call the "ListIdentities" API
Then the value at "Identities" should be a list
Scenario: Handling errors
When I attempt to call the "VerifyEmailIdentity" API with:
| EmailAddress | fake_email |
Then I expect the response error code to be "InvalidParameterValue"
And I expect the response error message to include:
"""
Invalid email address<fake_email>.
"""
+230
View File
@@ -0,0 +1,230 @@
// +build integration
// Package smoke contains shared step definitions that are used across integration tests
package smoke
import (
"encoding/json"
"fmt"
"os"
"reflect"
"regexp"
"strconv"
"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"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/session"
)
// Session is a shared session for all integration smoke tests to use.
var Session = session.Must(session.NewSession())
func init() {
logLevel := Session.Config.LogLevel
if os.Getenv("DEBUG") != "" {
logLevel = aws.LogLevel(aws.LogDebug)
}
if os.Getenv("DEBUG_SIGNING") != "" {
logLevel = aws.LogLevel(aws.LogDebugWithSigning)
}
if os.Getenv("DEBUG_BODY") != "" {
logLevel = aws.LogLevel(aws.LogDebugWithHTTPBody)
}
Session.Config.LogLevel = logLevel
gucumber.When(`^I call the "(.+?)" API$`, func(op string) {
call(op, nil, false)
})
gucumber.When(`^I call the "(.+?)" API with:$`, func(op string, args [][]string) {
call(op, args, false)
})
gucumber.Then(`^the value at "(.+?)" should be a list$`, func(member string) {
vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
assert.NotNil(gucumber.T, vals)
})
gucumber.Then(`^the response should contain a "(.+?)"$`, func(member string) {
vals, _ := awsutil.ValuesAtPath(gucumber.World["response"], member)
assert.NotEmpty(gucumber.T, vals)
})
gucumber.When(`^I attempt to call the "(.+?)" API with:$`, func(op string, args [][]string) {
call(op, args, true)
})
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 {
assert.Equal(gucumber.T, code, err.Code(), "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 {
assert.Contains(gucumber.T, err.Error(), data)
}
})
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 {
found := false
for _, row := range table {
if strings.Contains(err.Error(), row[0]) {
found = true
break
}
}
assert.True(gucumber.T, found, fmt.Sprintf("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())
})
gucumber.When(`^I call the "(.+?)" API with JSON:$`, func(s1 string, data string) {
callWithJSON(s1, data, false)
})
gucumber.When(`^I attempt to call the "(.+?)" API with JSON:$`, func(s1 string, data string) {
callWithJSON(s1, data, true)
})
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())
})
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)
})
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)
})
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)
})
}
// findMethod finds the op operation on the v structure using a case-insensitive
// lookup. Returns nil if no method is found.
func findMethod(v reflect.Value, op string) *reflect.Value {
t := v.Type()
op = strings.ToLower(op)
for i := 0; i < t.NumMethod(); i++ {
name := t.Method(i).Name
if strings.ToLower(name) == op {
m := v.MethodByName(name)
return &m
}
}
return nil
}
// call calls an operation on gucumber.World["client"] by the name op using the args
// table of arguments to set.
func call(op string, args [][]string, allowError bool) {
v := reflect.ValueOf(gucumber.World["client"])
if m := findMethod(v, op); m != nil {
t := m.Type()
in := reflect.New(t.In(0).Elem())
fillArgs(in, args)
resps := m.Call([]reflect.Value{in})
gucumber.World["response"] = resps[0].Interface()
gucumber.World["error"] = resps[1].Interface()
if !allowError {
err, _ := gucumber.World["error"].(error)
assert.NoError(gucumber.T, err)
}
} else {
assert.Fail(gucumber.T, "failed to find operation "+op)
}
}
// reIsNum is a regular expression matching a numeric input (integer)
var reIsNum = regexp.MustCompile(`^\d+$`)
// reIsArray is a regular expression matching a list
var reIsArray = regexp.MustCompile(`^\['.*?'\]$`)
var reArrayElem = regexp.MustCompile(`'(.+?)'`)
// fillArgs fills arguments on the input structure using the args table of
// arguments.
func fillArgs(in reflect.Value, args [][]string) {
if args == nil {
return
}
for _, row := range args {
path := row[0]
var val interface{} = row[1]
if reIsArray.MatchString(row[1]) {
quotedStrs := reArrayElem.FindAllString(row[1], -1)
strs := make([]*string, len(quotedStrs))
for i, e := range quotedStrs {
str := e[1 : len(e)-1]
strs[i] = &str
}
val = strs
} else if reIsNum.MatchString(row[1]) { // handle integer values
num, err := strconv.ParseInt(row[1], 10, 64)
if err == nil {
val = num
}
}
awsutil.SetValueAtPath(in.Interface(), path, val)
}
}
func callWithJSON(op, j string, allowError bool) {
v := reflect.ValueOf(gucumber.World["client"])
if m := findMethod(v, op); m != nil {
t := m.Type()
in := reflect.New(t.In(0).Elem())
fillJSON(in, j)
resps := m.Call([]reflect.Value{in})
gucumber.World["response"] = resps[0].Interface()
gucumber.World["error"] = resps[1].Interface()
if !allowError {
err, _ := gucumber.World["error"].(error)
assert.NoError(gucumber.T, err)
}
} else {
assert.Fail(gucumber.T, "failed to find operation "+op)
}
}
func fillJSON(in reflect.Value, j string) {
d := json.NewDecoder(strings.NewReader(j))
if err := d.Decode(in.Interface()); err != nil {
panic(err)
}
}
@@ -0,0 +1,16 @@
// +build integration
//Package simpledb provides gucumber integration tests support.
package simpledb
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/simpledb"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@simpledb", func() {
gucumber.World["client"] = simpledb.New(smoke.Session)
})
}
@@ -0,0 +1,24 @@
# language: en
@simpledb @sdb
Feature: Amazon SimpleDB
I want to use Amazon SimpleDB
Scenario: Making a request
When I call the "CreateDomain" API with:
| DomainName | sample-domain |
Then the request should be successful
And I call the "ListDomains" API
Then the value at "DomainNames" should be a list
And I call the "DeleteDomain" API with:
| DomainName | sample-domain |
Then the request should be successful
Scenario: Handling errors
When I attempt to call the "CreateDomain" API with:
| DomainName | |
Then I expect the response error code to be "InvalidParameterValue"
And I expect the response error message to include:
"""
DomainName is invalid
"""
@@ -0,0 +1,16 @@
// +build integration
//Package sns provides gucumber integration tests support.
package sns
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@sns", func() {
gucumber.World["client"] = sns.New(smoke.Session)
})
}
@@ -0,0 +1,14 @@
# language: en
@sns @client
Feature: Amazon Simple Notification Service
Scenario: Making a request
When I call the "ListTopics" API
Then the value at "Topics" should be a list
Scenario: Handling errors
When I attempt to call the "Publish" API with:
| Message | hello |
| TopicArn | fake_topic |
Then I expect the response error code to be "InvalidParameter"
And I expect the response error message not be empty
@@ -0,0 +1,16 @@
// +build integration
//Package sqs provides gucumber integration tests support.
package sqs
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/sqs"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@sqs", func() {
gucumber.World["client"] = sqs.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@sqs @client
Feature: Amazon Simple Queue Service
Scenario: Making a request
When I call the "ListQueues" API
Then the value at "QueueUrls" should be a list
Scenario: Handling errors
When I attempt to call the "GetQueueUrl" API with:
| QueueName | fake_queue |
Then I expect the response error code to be "AWS.SimpleQueueService.NonExistentQueue"
And I expect the response error message to include:
"""
The specified queue does not exist for this wsdl version.
"""
@@ -0,0 +1,16 @@
// +build integration
//Package ssm provides gucumber integration tests support.
package ssm
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/ssm"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@ssm", func() {
gucumber.World["client"] = ssm.New(smoke.Session)
})
}
@@ -0,0 +1,16 @@
# language: en
@ssm @client
Feature: Amazon SSM
Scenario: Making a request
When I call the "ListDocuments" API
Then the value at "DocumentIdentifiers" should be a list
Scenario: Handling errors
When I attempt to call the "GetDocument" API with:
| Name | 'fake-name' |
Then I expect the response error code to be "ValidationException"
And I expect the response error message to include:
"""
validation error detected
"""
@@ -0,0 +1,16 @@
// +build integration
//Package storagegateway provides gucumber integration tests support.
package storagegateway
import (
"github.com/aws/aws-sdk-go/awstesting/integration/smoke"
"github.com/aws/aws-sdk-go/service/storagegateway"
"github.com/gucumber/gucumber"
)
func init() {
gucumber.Before("@storagegateway", func() {
gucumber.World["client"] = storagegateway.New(smoke.Session)
})
}

Some files were not shown because too many files have changed in this diff Show More