aws-sdk 2.0.1 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +20 -0
- package/.gitignore +10 -0
- package/.travis.yml +20 -0
- package/.yardopts +20 -0
- package/.yardopts_guide +21 -0
- package/Gemfile +16 -0
- package/Gemfile.lock +34 -0
- package/README.md +5 -6
- package/Rakefile +14 -0
- package/UPGRADING.md +9 -4
- package/configuration.sample +5 -0
- package/dist/BUNDLE_LICENSE.txt +96 -0
- package/dist/aws-sdk.js +9594 -0
- package/dist/aws-sdk.min.js +21 -0
- package/dist-tools/.eslintrc +10 -0
- package/dist-tools/browser-builder.js +142 -0
- package/dist-tools/strategies/cache.js +68 -0
- package/dist-tools/strategies/default.js +165 -0
- package/dist-tools/test/browser-builder.mocha.spec.coffee +182 -0
- package/dist-tools/test/helpers.coffee +16 -0
- package/doc-src/guide/browser-building.md +93 -0
- package/doc-src/guide/browser-configuring-wif.md +287 -0
- package/doc-src/guide/browser-configuring.md +218 -0
- package/doc-src/guide/browser-examples.md +220 -0
- package/doc-src/guide/browser-intro.md +46 -0
- package/doc-src/guide/browser-making-requests.md +279 -0
- package/doc-src/guide/browser-services.md +75 -0
- package/doc-src/guide/index.md +41 -0
- package/doc-src/guide/node-configuring.md +272 -0
- package/doc-src/guide/node-examples.md +341 -0
- package/doc-src/guide/node-intro.md +32 -0
- package/doc-src/guide/node-making-requests.md +309 -0
- package/doc-src/guide/node-services.md +159 -0
- package/doc-src/templates/api-versions/model_documentor.rb +366 -0
- package/doc-src/templates/api-versions/plugin.rb +230 -0
- package/doc-src/templates/api-versions/templates/default/class/html/setup.rb +9 -0
- package/doc-src/templates/api-versions/templates/default/class/html/waiter_details_list.erb +7 -0
- package/doc-src/templates/api-versions/templates/default/class/html/waiter_summary.erb +7 -0
- package/doc-src/templates/api-versions/templates/default/docstring/html/experimental.erb +4 -0
- package/doc-src/templates/api-versions/templates/default/docstring/setup.rb +9 -0
- package/doc-src/templates/api-versions/templates/default/fulldoc/html/css/common.css +6 -0
- package/doc-src/templates/api-versions/templates/default/fulldoc/html/setup.rb +62 -0
- package/doc-src/templates/api-versions/templates/default/layout/html/services.erb +10 -0
- package/doc-src/templates/api-versions/templates/default/layout/html/setup.rb +28 -0
- package/doc-src/templates/api-versions/templates/default/module/html/box_info.erb +45 -0
- package/doc-src/templates/api-versions/templates/default/module/html/children.erb +8 -0
- package/doc-src/templates/api-versions/templates/default/tags/setup.rb +3 -0
- package/doc-src/templates/api-versions/templates/default/waiter_details/html/method_signature.erb +3 -0
- package/doc-src/templates/api-versions/templates/default/waiter_details/html/setup.rb +5 -0
- package/doc-src/templates/default/layout/html/footer.erb +31 -0
- package/doc-src/templates/default/layout/html/layout.erb +23 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/highlight.github.css +127 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/css/style.css +1192 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/img/logo.png +0 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/app.js +33 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/highlight.pack.js +27 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/AUTHORS +55 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/LICENSE +25 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/doctools.js +247 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/file.png +0 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/sphinx/searchtools.js +568 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/js/underscore.js +23 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search.erb +29 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/search_index.erb +1 -0
- package/doc-src/templates/flasky_sphinx_guide/fulldoc/html/setup.rb +75 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/layout.erb +93 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/setup.rb +9 -0
- package/doc-src/templates/flasky_sphinx_guide/layout/html/sidebar.erb +45 -0
- package/doc-src/templates/flasky_sphinx_guide/onefile/html/layout.erb +51 -0
- package/doc-src/templates/flasky_sphinx_guide/onefile/html/setup.rb +1 -0
- package/eslint-rules/no-require-in-service.js +10 -0
- package/features/autoscaling/autoscaling.feature +21 -0
- package/features/autoscaling/step_definitions/autoscaling.js +49 -0
- package/features/cloudformation/cloudformation.feature +22 -0
- package/features/cloudformation/step_definitions/cloudformation.js +26 -0
- package/features/cloudfront/cloudfront.feature +28 -0
- package/features/cloudfront/step_definitions/cloudfront-latest.js +54 -0
- package/features/cloudfront/step_definitions/cloudfront.js +21 -0
- package/features/cloudsearch/cloudsearch.feature +34 -0
- package/features/cloudsearch/step_definitions/cloudsearch.js +42 -0
- package/features/cloudtrail/cloudtrail.feature +17 -0
- package/features/cloudtrail/step_definitions/cloudtrail.js +14 -0
- package/features/cloudwatch/cloudwatch.feature +15 -0
- package/features/cloudwatch/step_definitions/cloudwatch.js +48 -0
- package/features/datapipeline/datapipeline.feature +23 -0
- package/features/datapipeline/step_definitions/datapipeline.js +79 -0
- package/features/directconnect/directconnect.feature +20 -0
- package/features/directconnect/step_definitions/directconnect.js +44 -0
- package/features/dynamodb/crc32.feature +18 -0
- package/features/dynamodb/step_definitions/dynamodb.js +154 -0
- package/features/dynamodb/tables.feature +50 -0
- package/features/ec2/ec2.feature +28 -0
- package/features/ec2/step_definitions/ec2.js +65 -0
- package/features/elasticache/elasticache.feature +20 -0
- package/features/elasticache/step_definitions/elasticache.js +34 -0
- package/features/elasticbeanstalk/elasticbeanstalk.feature +22 -0
- package/features/elasticbeanstalk/step_definitions/elasticbeanstalk.js +38 -0
- package/features/elastictranscoder/elastictranscoder.feature +24 -0
- package/features/elastictranscoder/step_definitions/elastictranscoder.js +56 -0
- package/features/elb/elb.feature +19 -0
- package/features/elb/step_definitions/elb.js +37 -0
- package/features/emr/emr.feature +16 -0
- package/features/emr/step_definitions/emr.js +45 -0
- package/features/extra/assertions.js +29 -0
- package/features/extra/dummy.feature +0 -0
- package/features/extra/fixtures/testfile.txt +1 -0
- package/features/extra/helpers.js +113 -0
- package/features/extra/hooks.js +107 -0
- package/features/extra/world.js +12 -0
- package/features/glacier/glacier.feature +47 -0
- package/features/glacier/step_definitions/glacier.js +112 -0
- package/features/iam/iam.feature +24 -0
- package/features/iam/step_definitions/iam.js +66 -0
- package/features/importexport/importexport.feature +53 -0
- package/features/importexport/step_definitions/importexport.js +42 -0
- package/features/kinesis/kinesis.feature +9 -0
- package/features/kinesis/step_definitions/kinesis.js +10 -0
- package/features/opsworks/opsworks.feature +26 -0
- package/features/opsworks/step_definitions/opsworks.js +42 -0
- package/features/rds/rds.feature +32 -0
- package/features/rds/step_definitions/rds.js +72 -0
- package/features/redshift/redshift.feature +20 -0
- package/features/redshift/step_definitions/redshift.js +33 -0
- package/features/route53/route53.feature +41 -0
- package/features/route53/step_definitions/route53.js +97 -0
- package/features/s3/buckets.feature +40 -0
- package/features/s3/objects.feature +122 -0
- package/features/s3/step_definitions/buckets.js +136 -0
- package/features/s3/step_definitions/hooks.js +39 -0
- package/features/s3/step_definitions/objects.js +204 -0
- package/features/s3/step_definitions/proxy.js +44 -0
- package/features/ses/ses.feature +20 -0
- package/features/ses/step_definitions/ses.js +22 -0
- package/features/simpledb/simpledb.feature +29 -0
- package/features/simpledb/step_definitions/simpledb.js +46 -0
- package/features/sns/sns.feature +15 -0
- package/features/sns/step_definitions/sns.js +33 -0
- package/features/sqs/messages.feature +21 -0
- package/features/sqs/queues.feature +18 -0
- package/features/sqs/step_definitions/messages.js +46 -0
- package/features/sqs/step_definitions/queues.js +33 -0
- package/features/sqs/step_definitions/sqs.js +7 -0
- package/features/storagegateway/step_definitions/storagegateway.js +16 -0
- package/features/storagegateway/storagegateway.feature +13 -0
- package/features/sts/step_definitions/sts.js +35 -0
- package/features/sts/sts.feature +29 -0
- package/features/support/step_definitions/support.js +35 -0
- package/features/support/support.feature +18 -0
- package/features/swf/step_definitions/swf.js +38 -0
- package/features/swf/swf.feature +15 -0
- package/index.js +2 -0
- package/lib/core.js +2 -2
- package/lib/credentials/shared_ini_file_credentials.js +0 -1
- package/lib/event_listeners.js +13 -1
- package/lib/http/node.js +19 -30
- package/lib/model/resource_waiter.js +0 -4
- package/lib/model/shape.js +2 -1
- package/lib/protocol/rest_xml.js +1 -1
- package/lib/region_config.js +31 -0
- package/lib/region_config.json +56 -0
- package/lib/request.js +37 -45
- package/lib/sequential_executor.js +17 -34
- package/lib/service.js +17 -44
- package/lib/services/cloudsearchdomain.js +69 -0
- package/lib/services/route53.js +0 -12
- package/lib/services/s3.js +3 -19
- package/lib/signers/v4.js +2 -1
- package/lib/util.js +28 -3
- package/package.json +3 -3
- package/scripts/console +11 -3
- package/scripts/coverage +126 -0
- package/tasks/apis.rake +122 -0
- package/tasks/browser.rake +89 -0
- package/tasks/docs.rake +36 -0
- package/tasks/lib/cucumber_generator.rb +40 -0
- package/tasks/util.rake +33 -0
- package/test/browser/js/jasmine-1.3.1.js +2600 -0
- package/test/browser/js/jasmine-html.js +681 -0
- package/test/browser/runner.html +109 -0
- package/test/browser/runner.js +92 -0
- package/test/browser/sample/appinfo.sample.js +15 -0
- package/test/browser/sample/console.html +429 -0
- package/test/browser/sample/css/smoothness/images/animated-overlay.gif +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.css +1175 -0
- package/test/browser/sample/css/smoothness/jquery-ui-1.10.1.custom.min.css +5 -0
- package/test/browser/sample/img/loading.gif +0 -0
- package/test/browser/sample/js/jquery-1.9.1.js +9597 -0
- package/test/browser/sample/js/jquery-ui-1.10.1.custom.js +14903 -0
- package/test/browser/sample/js/jquery-ui-1.10.1.custom.min.js +6 -0
- package/test/browser/sample/s3upload.html +111 -0
- package/test/browser.spec.coffee +207 -0
- package/test/config.spec.coffee +202 -0
- package/test/credential_provider_chain.spec.coffee +90 -0
- package/test/credentials.spec.coffee +452 -0
- package/test/endpoint.spec.coffee +80 -0
- package/test/event_listeners.spec.coffee +493 -0
- package/test/helpers.coffee +150 -0
- package/test/http_request.spec.coffee +55 -0
- package/test/json/builder.spec.coffee +129 -0
- package/test/json/parser.spec.coffee +108 -0
- package/test/metadata_service.spec.coffee +54 -0
- package/test/model/api.spec.coffee +67 -0
- package/test/model/shape.spec.coffee +23 -0
- package/test/node_http_client.spec.coffee +40 -0
- package/test/param_validator.spec.coffee +456 -0
- package/test/protocol/json.spec.coffee +167 -0
- package/test/protocol/query.spec.coffee +191 -0
- package/test/protocol/rest.spec.coffee +237 -0
- package/test/protocol/rest_json.spec.coffee +255 -0
- package/test/protocol/rest_xml.spec.coffee +329 -0
- package/test/query/query_param_serializer.spec.coffee +327 -0
- package/test/region_config.spec.coffee +50 -0
- package/test/request.spec.coffee +316 -0
- package/test/resource_waiter.spec.coffee +89 -0
- package/test/response.spec.coffee +81 -0
- package/test/sequential_executor.spec.coffee +118 -0
- package/test/service.spec.coffee +230 -0
- package/test/services/cloudfront.spec.coffee +44 -0
- package/test/services/cloudsearchdomain.spec.coffee +23 -0
- package/test/services/dynamodb.spec.coffee +32 -0
- package/test/services/ec2.spec.coffee +78 -0
- package/test/services/elastictranscoder.spec.coffee +43 -0
- package/test/services/glacier.spec.coffee +61 -0
- package/test/services/rds.spec.coffee +38 -0
- package/test/services/route53.spec.coffee +77 -0
- package/test/services/s3.spec.coffee +538 -0
- package/test/services/simpledb.spec.coffee +12 -0
- package/test/services/sqs.spec.coffee +130 -0
- package/test/services/sts.spec.coffee +72 -0
- package/test/services/swf.spec.coffee +6 -0
- package/test/signers/presign.spec.coffee +36 -0
- package/test/signers/s3.spec.coffee +297 -0
- package/test/signers/v2.spec.coffee +68 -0
- package/test/signers/v4.spec.coffee +135 -0
- package/test/util.spec.coffee +510 -0
- package/test/xml/builder.spec.coffee +529 -0
- package/test/xml/parser.spec.coffee +587 -0
- package/lib/services/simpledb.js +0 -15
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@cloudwatch", function (callback) {
|
|
3
|
+
this.service = new this.AWS.CloudWatch();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I create a CloudWatch alarm with (prefix|name) "([^"]*)"$/, function(prefix, name, callback) {
|
|
8
|
+
var timestamp = new Date().getTime();
|
|
9
|
+
this.cloudWatchAlarm = {
|
|
10
|
+
AlarmName: name,
|
|
11
|
+
MetricName: 'aws-sdk-js-metric-' + timestamp,
|
|
12
|
+
Namespace: 'aws-sdk-js-namespace' + timestamp,
|
|
13
|
+
ComparisonOperator: 'GreaterThanThreshold',
|
|
14
|
+
EvaluationPeriods: 5,
|
|
15
|
+
Period: 60,
|
|
16
|
+
Statistic: 'Average',
|
|
17
|
+
Threshold: 50.0
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (prefix === 'prefix') {
|
|
21
|
+
this.cloudWatchAlarm.AlarmName += '-' + timestamp;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
this.request(null, 'putMetricAlarm', this.cloudWatchAlarm,
|
|
25
|
+
callback, prefix === 'name' ? false : undefined);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
this.Given(/^I list the CloudWatch alarms$/, function(callback) {
|
|
29
|
+
var params = {
|
|
30
|
+
MetricName: this.cloudWatchAlarm.MetricName,
|
|
31
|
+
Namespace: this.cloudWatchAlarm.Namespace
|
|
32
|
+
};
|
|
33
|
+
this.request(null, 'describeAlarmsForMetric', params, callback);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
this.Then(/^the list should contain the CloudWatch alarm$/, function(callback) {
|
|
37
|
+
var name = this.cloudWatchAlarm.AlarmName;
|
|
38
|
+
this.assert.contains(this.data.MetricAlarms, function(alarm) {
|
|
39
|
+
return alarm.AlarmName === name;
|
|
40
|
+
});
|
|
41
|
+
callback();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
this.Then(/^I delete the CloudWatch alarm$/, function(callback) {
|
|
45
|
+
this.request(null, 'deleteAlarms',
|
|
46
|
+
{AlarmNames: [this.cloudWatchAlarm.AlarmName]}, callback);
|
|
47
|
+
});
|
|
48
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@datapipeline
|
|
3
|
+
Feature: AWS Data Pipeline
|
|
4
|
+
|
|
5
|
+
I want to use AWS Data Pipeline
|
|
6
|
+
|
|
7
|
+
Scenario: Managing pipelines
|
|
8
|
+
Given I create a Data Pipeline with name prefix "aws-sdk-js"
|
|
9
|
+
Then the response should contain the pipeline ID
|
|
10
|
+
When I describe the Data Pipelines
|
|
11
|
+
Then the pipeline should be in the list
|
|
12
|
+
And I put a Data Pipeline definition
|
|
13
|
+
And I get the Data Pipeline definition
|
|
14
|
+
And the the objects should be in the Data Pipeline definition
|
|
15
|
+
And I delete the Data Pipeline
|
|
16
|
+
|
|
17
|
+
Scenario: Error handling
|
|
18
|
+
Given I create a Data Pipeline with name prefix ""
|
|
19
|
+
Then the error code should be "ValidationException"
|
|
20
|
+
And the error message should match:
|
|
21
|
+
"""
|
|
22
|
+
Member must have length greater than or equal to 1
|
|
23
|
+
"""
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@datapipeline", function (callback) {
|
|
3
|
+
this.service = new this.AWS.DataPipeline();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var sortObjects = function sortObjects(objects) {
|
|
8
|
+
this.AWS.util.arrayEach(objects, function(item) {
|
|
9
|
+
item.fields.sort(function (field1, field2) {
|
|
10
|
+
return field1.key < field2.key ? -1 : 1;
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
this.Given(/^I create a Data Pipeline with name prefix "([^"]*)"$/, function(prefix, callback) {
|
|
16
|
+
var params = {
|
|
17
|
+
name: this.uniqueName(prefix), uniqueId: this.uniqueName('aws-js-sdk')
|
|
18
|
+
};
|
|
19
|
+
this.request(null, 'createPipeline', params, callback, false);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
this.Then(/^the response should contain the pipeline ID$/, function(callback) {
|
|
23
|
+
this.pipelineId = this.data.pipelineId;
|
|
24
|
+
callback();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
this.When(/^I describe the Data Pipelines$/, function(callback) {
|
|
28
|
+
var params = {pipelineIds: [this.pipelineId]};
|
|
29
|
+
this.request(null, 'describePipelines', params, callback);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
this.Then(/^the pipeline should be in the list$/, function(callback) {
|
|
33
|
+
var id = this.data.pipelineDescriptionList[0].pipelineId;
|
|
34
|
+
this.assert.equal(id, this.pipelineId);
|
|
35
|
+
callback();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
this.Then(/^I put a Data Pipeline definition$/, function(callback) {
|
|
39
|
+
this.pipelineDefinition = {
|
|
40
|
+
pipelineId: this.pipelineId,
|
|
41
|
+
pipelineObjects: [
|
|
42
|
+
{id: 'Schedule', name: 'Schedule', fields: [
|
|
43
|
+
{key: 'type', stringValue: 'Schedule'},
|
|
44
|
+
{key: 'period', stringValue: '1 hour'},
|
|
45
|
+
{key: 'startDateTime', stringValue: '2012-12-12T00:00:00'},
|
|
46
|
+
{key: 'endDateTime', stringValue: '2012-12-21T18:00:00'}
|
|
47
|
+
]},
|
|
48
|
+
{id: 'Default', name: 'Default', fields: [
|
|
49
|
+
{key: 'workerGroup', stringValue: 'workerGroup'}
|
|
50
|
+
]},
|
|
51
|
+
{id: 'SayHello', name: 'SayHello', fields: [
|
|
52
|
+
{key: 'type', stringValue: 'ShellCommandActivity'},
|
|
53
|
+
{key: 'command', stringValue: 'echo hello'},
|
|
54
|
+
{key: 'parent', refValue: 'Default'},
|
|
55
|
+
{key: 'schedule', refValue: 'Schedule'}
|
|
56
|
+
]}
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
sortObjects.call(this, this.pipelineDefinition.pipelineObjects);
|
|
60
|
+
this.request(null, 'putPipelineDefinition', this.pipelineDefinition, callback);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
this.Then(/^I get the Data Pipeline definition$/, function(callback) {
|
|
64
|
+
var params = {pipelineId:this.pipelineId};
|
|
65
|
+
this.request(null, 'getPipelineDefinition', params, callback);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
this.Then(/^the the objects should be in the Data Pipeline definition$/, function(callback) {
|
|
69
|
+
var objects = this.pipelineDefinition.pipelineObjects;
|
|
70
|
+
sortObjects.call(this, this.data.pipelineObjects);
|
|
71
|
+
this.assert.deepEqual(this.data.pipelineObjects, objects);
|
|
72
|
+
callback();
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
this.Then(/^I delete the Data Pipeline$/, function(callback) {
|
|
76
|
+
var params = {pipelineId: this.pipelineId};
|
|
77
|
+
this.request(null, 'deletePipeline', params, callback);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@directconnect
|
|
3
|
+
Feature: AWS Direct Connect
|
|
4
|
+
|
|
5
|
+
I want to use AWS Direct Connect
|
|
6
|
+
|
|
7
|
+
Scenario: Managing connections
|
|
8
|
+
Given I create a Direct Connect connection with name prefix "aws-sdk-js"
|
|
9
|
+
Then I should get a Direct Connect connection ID
|
|
10
|
+
And I describe the connection
|
|
11
|
+
Then the bandwidth should match the connection bandwidth
|
|
12
|
+
And I delete the Direct Connect connection
|
|
13
|
+
|
|
14
|
+
Scenario: Error handling
|
|
15
|
+
Given I create a Direct Connect connection with an invalid location
|
|
16
|
+
Then the error code should be "DirectConnectServerException"
|
|
17
|
+
And the error message should be:
|
|
18
|
+
"""
|
|
19
|
+
Unable to process request
|
|
20
|
+
"""
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@directconnect", function (callback) {
|
|
3
|
+
this.service = new this.AWS.DirectConnect();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.When(/^I create a Direct Connect connection with name prefix "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
var params = {
|
|
9
|
+
bandwidth: '1Gbps', location: 'EqDC2',
|
|
10
|
+
connectionName: this.uniqueName(prefix)
|
|
11
|
+
};
|
|
12
|
+
this.request(null, 'createConnection', params, callback);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
this.Then(/^I should get a Direct Connect connection ID$/, function(callback) {
|
|
16
|
+
this.connectionId = this.data.connectionId;
|
|
17
|
+
this.connectionData = this.data;
|
|
18
|
+
callback();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
this.Then(/^I describe the connection$/, function(callback) {
|
|
22
|
+
var params = {connectionId: this.connectionId};
|
|
23
|
+
this.request(null, 'describeConnections', params, callback);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
this.Then(/^the bandwidth should match the connection bandwidth$/, function(callback) {
|
|
27
|
+
this.assert.equal(this.connectionData.bandwidth, this.data.connections[0].bandwidth);
|
|
28
|
+
callback();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
this.Then(/^I delete the Direct Connect connection$/, function(callback) {
|
|
32
|
+
var params = {connectionId: this.connectionId};
|
|
33
|
+
this.request(null, 'deleteConnection', params, callback);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
this.Given(/^I create a Direct Connect connection with an invalid location$/, function(callback) {
|
|
37
|
+
var params = {
|
|
38
|
+
bandwidth: '1Gbps',
|
|
39
|
+
location: 'INVALID_LOCATION',
|
|
40
|
+
connectionName: this.uniqueName('aws-sdk-js')
|
|
41
|
+
};
|
|
42
|
+
this.request(null, 'createConnection', params, callback, false);
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@dynamodb @dynamodb-2011-12-05 @crc32
|
|
3
|
+
Feature: CRC32 response validation
|
|
4
|
+
|
|
5
|
+
Scenario: Retry on corrupted request
|
|
6
|
+
Given my first request is corrupted with CRC checking ON
|
|
7
|
+
Then the request should be retried
|
|
8
|
+
And the request should not fail with a CRC checking error
|
|
9
|
+
|
|
10
|
+
Scenario: Failed retries on corrupted request
|
|
11
|
+
Given all of my requests are corrupted with CRC checking ON
|
|
12
|
+
Then the request is retried the maximum number of times
|
|
13
|
+
And the request should fail with a CRC checking error
|
|
14
|
+
|
|
15
|
+
Scenario: Ignore corrupted request with CRC checking OFF
|
|
16
|
+
Given my first request is corrupted with CRC checking OFF
|
|
17
|
+
Then the request should not be retried
|
|
18
|
+
And the request should not fail with a CRC checking error
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@dynamodb-2011-12-05", function (next) {
|
|
3
|
+
this.service = new this.AWS.DynamoDB({
|
|
4
|
+
apiVersion: '2011-12-05',
|
|
5
|
+
region: 'us-west-2',
|
|
6
|
+
maxRetries: 2
|
|
7
|
+
});
|
|
8
|
+
next();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
this.Before("@dynamodb-2012-08-10", function (next) {
|
|
12
|
+
this.service = new this.AWS.DynamoDB({
|
|
13
|
+
apiVersion: '2012-08-10',
|
|
14
|
+
region: 'us-west-2',
|
|
15
|
+
maxRetries: 2
|
|
16
|
+
});
|
|
17
|
+
next();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
function createTable(world, callback) {
|
|
21
|
+
var db = new world.AWS.DynamoDB({
|
|
22
|
+
apiVersion: '2011-12-05',
|
|
23
|
+
region: 'us-west-2'
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
var params = {
|
|
27
|
+
TableName: world.tableName,
|
|
28
|
+
KeySchema: {
|
|
29
|
+
HashKeyElement: { AttributeName: 'id', AttributeType: 'S' }
|
|
30
|
+
},
|
|
31
|
+
ProvisionedThroughput: {
|
|
32
|
+
ReadCapacityUnits: 10,
|
|
33
|
+
WriteCapacityUnits: 5,
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
db.createTable(params, function(err, data) {
|
|
38
|
+
if (err) {
|
|
39
|
+
callback.fail(err);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
params = { TableName: world.tableName };
|
|
43
|
+
db.waitFor('tableExists', params, callback);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
this.Given(/^I have a table$/, function(callback) {
|
|
48
|
+
var world = this;
|
|
49
|
+
this.tableName = 'aws-sdk-js-integration-test';
|
|
50
|
+
this.service.listTables(function(err, data) {
|
|
51
|
+
for (var i = 0; i < data.TableNames.length; i++) {
|
|
52
|
+
if (data.TableNames[i] == world.tableName) {
|
|
53
|
+
callback();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
createTable(world, callback);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
this.When(/^I put the item:$/, function(string, next) {
|
|
62
|
+
var params = {TableName: this.tableName, Item: JSON.parse(string)};
|
|
63
|
+
this.request(null, 'putItem', params, next);
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
this.Then(/^the item with id "([^"]*)" should exist$/, function(key, next) {
|
|
67
|
+
var world = this;
|
|
68
|
+
var params;
|
|
69
|
+
if (this.service.config.apiVersion === '2011-12-05') {
|
|
70
|
+
params = {TableName: this.tableName, Key: {HashKeyElement: {S: key}}};
|
|
71
|
+
} else if (this.service.config.apiVersion === '2012-08-10') {
|
|
72
|
+
params = {TableName: this.tableName, Key: {id: {S: key}}};
|
|
73
|
+
}
|
|
74
|
+
this.request(null, 'getItem', params, next);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
this.Then(/^it should have attribute "([^"]*)" containing "([^"]*)"$/, function(attr, value, next) {
|
|
78
|
+
this.assert.equal(this.data.Item[attr].S, value);
|
|
79
|
+
next();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
this.When(/^I delete the table$/, function(next) {
|
|
83
|
+
var params = {TableName: this.tableName};
|
|
84
|
+
this.request(null, 'deleteTable', params, next);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
this.Then(/^the table should eventually not exist$/, function(callback) {
|
|
88
|
+
var params = {TableName: this.tableName};
|
|
89
|
+
this.service.waitFor('tableNotExists', params, callback);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
this.Given(/^my first request is corrupted with CRC checking (ON|OFF)$/, function(toggle, callback) {
|
|
93
|
+
var world = this;
|
|
94
|
+
this.service.config.dynamoDbCrc32 = toggle == 'ON' ? true : false;
|
|
95
|
+
var req = this.service.listTables();
|
|
96
|
+
this.service.config.dynamoDbCrc32 = true;
|
|
97
|
+
req.removeAllListeners('httpData');
|
|
98
|
+
req.on('httpData', function(chunk, resp) {
|
|
99
|
+
if (resp.retryCount == 0) {
|
|
100
|
+
resp.httpResponse.body = new Buffer('{"invalid":"response"}');
|
|
101
|
+
} else {
|
|
102
|
+
world.AWS.EventListeners.Core.HTTP_DATA.call(this, chunk, resp);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
req.on('complete', function(resp) {
|
|
106
|
+
world.error = resp.error;
|
|
107
|
+
world.response = resp;
|
|
108
|
+
if (resp.error) callback.fail(resp.error);
|
|
109
|
+
else callback();
|
|
110
|
+
});
|
|
111
|
+
req.send();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
this.Then(/^the request should( not)? be retried$/, function(retry, callback) {
|
|
115
|
+
if (retry && this.response.retryCount > 0) callback.fail('Request was incorrectly retried');
|
|
116
|
+
if (!retry && this.response.retryCount == 0) callback.fail('Request was incorrectly retried');
|
|
117
|
+
callback();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
this.Given(/^all of my requests are corrupted with CRC checking ON$/, function(callback) {
|
|
121
|
+
var world = this;
|
|
122
|
+
var req = this.service.listTables();
|
|
123
|
+
req.removeAllListeners('httpData');
|
|
124
|
+
req.on('httpData', function(chunk, resp) {
|
|
125
|
+
resp.httpResponse.body = new Buffer('{"invalid":"response"}');
|
|
126
|
+
});
|
|
127
|
+
req.on('complete', function(resp) {
|
|
128
|
+
world.error = resp.error;
|
|
129
|
+
world.response = resp;
|
|
130
|
+
callback();
|
|
131
|
+
});
|
|
132
|
+
req.send();
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
this.When(/^the request is retried the maximum number of times$/, function(callback) {
|
|
136
|
+
if (this.response.retryCount != 2) callback.fail('Incorrect retry count');
|
|
137
|
+
callback();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
this.Then(/^the request should( not)? fail with a CRC checking error$/, function(failed, callback) {
|
|
141
|
+
if (failed && this.error) callback.fail(this.error);
|
|
142
|
+
if (!failed && !this.error) callback.fail('Did not fail when should have');
|
|
143
|
+
callback();
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
this.Given(/^I try to delete an item with key "([^"]*)" from table "([^"]*)"$/, function(key, table, callback) {
|
|
147
|
+
var params = {TableName: table, Key: {HashKeyElement: {S: key}}};
|
|
148
|
+
this.request(null, 'deleteItem', params, callback, false);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
this.Given(/^I try to delete a table with an empty table parameter$/, function(callback) {
|
|
152
|
+
this.request(null, 'deleteTable', {TableName: ''}, callback, false);
|
|
153
|
+
});
|
|
154
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@dynamodb @dynamodb-2011-12-05 @tables
|
|
3
|
+
Feature: DynamoDB Tables (2011-12-05)
|
|
4
|
+
|
|
5
|
+
Scenario: Item CRUD
|
|
6
|
+
Given I have a table
|
|
7
|
+
When I put the item:
|
|
8
|
+
"""
|
|
9
|
+
{"id": {"S": "foo"}, "data": {"S": "bår"}}
|
|
10
|
+
"""
|
|
11
|
+
Then the item with id "foo" should exist
|
|
12
|
+
And it should have attribute "data" containing "bår"
|
|
13
|
+
|
|
14
|
+
Scenario: UTF-8 support
|
|
15
|
+
Given I try to delete an item with key "føø" from table "table"
|
|
16
|
+
Then the error code should be "ResourceNotFoundException"
|
|
17
|
+
|
|
18
|
+
Scenario: Improper table deletion
|
|
19
|
+
Given I try to delete a table with an empty table parameter
|
|
20
|
+
Then the error code should be "ValidationException"
|
|
21
|
+
And the error message should be:
|
|
22
|
+
"""
|
|
23
|
+
TableName must be at least 3 characters long and at most 255 characters long
|
|
24
|
+
"""
|
|
25
|
+
And the status code should be 400
|
|
26
|
+
|
|
27
|
+
@dynamodb @dynamodb-2012-08-10 @tables
|
|
28
|
+
Feature: DynamoDB Tables (2012-08-10)
|
|
29
|
+
|
|
30
|
+
Scenario: Item CRUD
|
|
31
|
+
Given I have a table
|
|
32
|
+
When I put the item:
|
|
33
|
+
"""
|
|
34
|
+
{"id": {"S": "foo"}, "data": {"S": "bår"}}
|
|
35
|
+
"""
|
|
36
|
+
Then the item with id "foo" should exist
|
|
37
|
+
And it should have attribute "data" containing "bår"
|
|
38
|
+
|
|
39
|
+
Scenario: UTF-8 support
|
|
40
|
+
Given I try to delete an item with key "føø" from table "table"
|
|
41
|
+
Then the error code should be "ResourceNotFoundException"
|
|
42
|
+
|
|
43
|
+
Scenario: Improper table deletion
|
|
44
|
+
Given I try to delete a table with an empty table parameter
|
|
45
|
+
Then the error code should be "ValidationException"
|
|
46
|
+
And the error message should be:
|
|
47
|
+
"""
|
|
48
|
+
TableName must be at least 3 characters long and at most 255 characters long
|
|
49
|
+
"""
|
|
50
|
+
And the status code should be 400
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@ec2
|
|
3
|
+
Feature: Amazon Elastic Compute Cloud
|
|
4
|
+
|
|
5
|
+
I want to use Amazon Elastic Compute Cloud
|
|
6
|
+
|
|
7
|
+
Scenario: DescribeRegions
|
|
8
|
+
Given I describe EC2 regions "us-east-1, us-west-1"
|
|
9
|
+
Then the EC2 endpoint for "us-east-1" should be "ec2.us-east-1.amazonaws.com"
|
|
10
|
+
And the EC2 endpoint for "us-west-1" should be "ec2.us-west-1.amazonaws.com"
|
|
11
|
+
|
|
12
|
+
Scenario: Error handling
|
|
13
|
+
Given I describe the EC2 instance ""
|
|
14
|
+
Then the error code should be "MissingParameter"
|
|
15
|
+
And the error message should be:
|
|
16
|
+
"""
|
|
17
|
+
The request must contain the parameter InstanceId
|
|
18
|
+
"""
|
|
19
|
+
And the status code should be 400
|
|
20
|
+
|
|
21
|
+
Scenario: Encrypted CopySnapshot
|
|
22
|
+
Given I attempt to copy an encrypted snapshot across regions
|
|
23
|
+
Then the copy snapshot attempt should be successful
|
|
24
|
+
|
|
25
|
+
@pagination
|
|
26
|
+
Scenario: Paginating responses
|
|
27
|
+
Given I paginate the "describeReservedInstancesOfferings" operation with limit 20 and max pages 3
|
|
28
|
+
Then I should get 3 pages
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@ec2", function (callback) {
|
|
3
|
+
this.service = new this.AWS.EC2();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I describe EC2 regions "([^"]*)"$/, function(regions, callback) {
|
|
8
|
+
regions = regions.split(/\s*,\s*/);
|
|
9
|
+
this.request(null, 'describeRegions', {RegionNames: regions}, callback);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
this.Then(/^the EC2 endpoint for "([^"]*)" should be "([^"]*)"$/, function(region, endpoint, callback) {
|
|
13
|
+
this.assert.contains(this.data.Regions, function(region) {
|
|
14
|
+
return region.Endpoint === endpoint;
|
|
15
|
+
});
|
|
16
|
+
callback();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
this.Given(/^I describe the EC2 instance "([^"]*)"$/, function(instanceId, callback) {
|
|
20
|
+
this.request(null, 'describeInstances', {InstanceIds: [instanceId]}, callback, false);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
this.Given(/^I attempt to copy an encrypted snapshot across regions$/, function (callback) {
|
|
24
|
+
var self = this;
|
|
25
|
+
var volId, srcSnapId, dstSnapId, params;
|
|
26
|
+
var sourceRegion = 'us-west-2';
|
|
27
|
+
var destRegion = 'us-east-1';
|
|
28
|
+
var srcEc2 = new this.AWS.EC2({region: sourceRegion});
|
|
29
|
+
var dstEc2 = new this.AWS.EC2({region: destRegion});
|
|
30
|
+
|
|
31
|
+
function teardown() {
|
|
32
|
+
if (volId) srcEc2.deleteVolume({VolumeId: volId}).send();
|
|
33
|
+
if (srcSnapId) srcEc2.deleteSnapshot({SnapshotId: srcSnapId}).send();
|
|
34
|
+
if (dstSnapId) dstEc2.deleteSnapshot({SnapshotId: dstSnapId}).send();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
params = {AvailabilityZone:sourceRegion+'a',Size:1,Encrypted:true};
|
|
38
|
+
srcEc2.createVolume(params, function(err, data) {
|
|
39
|
+
if (err) return teardown();
|
|
40
|
+
volId = data.VolumeId;
|
|
41
|
+
|
|
42
|
+
setTimeout(function() {
|
|
43
|
+
srcEc2.createSnapshot({VolumeId: volId}, function(err, data) {
|
|
44
|
+
if (err) return teardown();
|
|
45
|
+
srcSnapId = data.SnapshotId;
|
|
46
|
+
|
|
47
|
+
setTimeout(function() {
|
|
48
|
+
params = {SourceRegion: sourceRegion, SourceSnapshotId: srcSnapId};
|
|
49
|
+
dstEc2.copySnapshot(params, function(err, data) {
|
|
50
|
+
if (data) dstSnapId = data.SnapshotId;
|
|
51
|
+
self.success = true;
|
|
52
|
+
callback();
|
|
53
|
+
teardown();
|
|
54
|
+
});
|
|
55
|
+
}, 1000);
|
|
56
|
+
});
|
|
57
|
+
}, 1500);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
this.Then(/^the copy snapshot attempt should be successful$/, function (callback) {
|
|
62
|
+
this.assert.equal(this.success, true);
|
|
63
|
+
callback();
|
|
64
|
+
});
|
|
65
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@elasticache
|
|
3
|
+
Feature: Amazon ElastiCache
|
|
4
|
+
|
|
5
|
+
I want to use Amazon ElastiCache
|
|
6
|
+
|
|
7
|
+
Scenario: Creating and deleting security groups
|
|
8
|
+
Given I create a ElastiCache security group with prefix name "aws-js-sdk"
|
|
9
|
+
And the ElastiCache security group name is in the result
|
|
10
|
+
And I describe the ElastiCache security group
|
|
11
|
+
Then the ElastiCache security group should be described
|
|
12
|
+
And I delete the ElastiCache security group
|
|
13
|
+
|
|
14
|
+
Scenario: Error handling
|
|
15
|
+
Given I create a ElastiCache security group with prefix name ""
|
|
16
|
+
Then the error code should be "InvalidParameterValue"
|
|
17
|
+
Then the error message should be:
|
|
18
|
+
"""
|
|
19
|
+
CacheSecurityGroupName is required
|
|
20
|
+
"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@elasticache", function (callback) {
|
|
3
|
+
this.service = new this.AWS.ElastiCache();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I create a ElastiCache security group with prefix name "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
this.cacheGroupName = this.uniqueName(prefix);
|
|
9
|
+
var params = { Description: 'Description', CacheSecurityGroupName: this.cacheGroupName };
|
|
10
|
+
this.request(null, 'createCacheSecurityGroup', params, callback, false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^the ElastiCache security group name is in the result$/, function(callback) {
|
|
14
|
+
var name = this.data.CacheSecurityGroup.CacheSecurityGroupName;
|
|
15
|
+
this.assert.equal(name, this.cacheGroupName);
|
|
16
|
+
callback();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
this.Given(/^I describe the ElastiCache security group$/, function(callback) {
|
|
20
|
+
var params = {CacheSecurityGroupName: this.cacheGroupName};
|
|
21
|
+
this.request(null, 'describeCacheSecurityGroups', params, callback);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
this.Then(/^the ElastiCache security group should be described$/, function(callback) {
|
|
25
|
+
var item = this.data.CacheSecurityGroups[0];
|
|
26
|
+
this.assert.equal(item.CacheSecurityGroupName, this.cacheGroupName);
|
|
27
|
+
callback();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
this.Then(/^I delete the ElastiCache security group$/, function(callback) {
|
|
31
|
+
var params = {CacheSecurityGroupName: this.cacheGroupName};
|
|
32
|
+
this.request(null, 'deleteCacheSecurityGroup', params, callback);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@elasticbeanstalk
|
|
3
|
+
Feature: AWS Elastic Beanstalk
|
|
4
|
+
|
|
5
|
+
I want to use AWS Elastic Beanstalk
|
|
6
|
+
|
|
7
|
+
@requiresakid
|
|
8
|
+
Scenario: Creating applications and application versions
|
|
9
|
+
Given I create an Elastic Beanstalk application with name prefix "aws-js-sdk"
|
|
10
|
+
And I create an Elastic Beanstalk application version with label "1.0.0"
|
|
11
|
+
And I describe the Elastic Beanstalk application
|
|
12
|
+
Then the result should contain the Elastic Beanstalk application version
|
|
13
|
+
And the result should contain the Elastic Beanstalk application name
|
|
14
|
+
And I delete the Elastic Beanstalk application
|
|
15
|
+
|
|
16
|
+
Scenario: Error handling
|
|
17
|
+
Given I create an Elastic Beanstalk application with name prefix ""
|
|
18
|
+
Then the error code should be "ValidationError"
|
|
19
|
+
And the error message should match:
|
|
20
|
+
"""
|
|
21
|
+
Value '' at 'applicationName'
|
|
22
|
+
"""
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
module.exports = function() {
|
|
2
|
+
this.Before("@elasticbeanstalk", function (callback) {
|
|
3
|
+
this.service = new this.AWS.ElasticBeanstalk();
|
|
4
|
+
callback();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
this.Given(/^I create an Elastic Beanstalk application with name prefix "([^"]*)"$/, function(prefix, callback) {
|
|
8
|
+
this.appName = this.uniqueName(prefix);
|
|
9
|
+
var params = { ApplicationName: this.appName };
|
|
10
|
+
this.request(null, 'createApplication', params, callback, false);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
this.Given(/^I create an Elastic Beanstalk application version with label "([^"]*)"$/, function(label, callback) {
|
|
14
|
+
this.appVersion = label;
|
|
15
|
+
var params = { ApplicationName: this.appName, VersionLabel: this.appVersion };
|
|
16
|
+
this.request(null, 'createApplicationVersion', params, callback);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
this.Given(/^I describe the Elastic Beanstalk application$/, function(callback) {
|
|
20
|
+
var params = { ApplicationNames: [this.appName] };
|
|
21
|
+
this.request(null, 'describeApplications', params, callback);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
this.Then(/^the result should contain the Elastic Beanstalk application version$/, function(callback) {
|
|
25
|
+
this.assert.deepEqual(this.data.Applications[0].Versions, [this.appVersion]);
|
|
26
|
+
callback();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
this.Then(/^the result should contain the Elastic Beanstalk application name$/, function(callback) {
|
|
30
|
+
this.assert.equal(this.data.Applications[0].ApplicationName, this.appName);
|
|
31
|
+
callback();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
this.Then(/^I delete the Elastic Beanstalk application$/, function(callback) {
|
|
35
|
+
var params = { ApplicationName: this.appName };
|
|
36
|
+
this.request(null, 'deleteApplication', params, callback);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# language: en
|
|
2
|
+
@elastictranscoder
|
|
3
|
+
Feature: Elastic Transcoder
|
|
4
|
+
|
|
5
|
+
I want to use Amazon Elastic Transcoder
|
|
6
|
+
|
|
7
|
+
@pipelines
|
|
8
|
+
Scenario: Pipeline CRUD
|
|
9
|
+
Given I create an IAM role with name prefix "aws-sdk-js"
|
|
10
|
+
And I create a bucket
|
|
11
|
+
And I create an Elastic Transcoder pipeline with name prefix "aws-sdk-js"
|
|
12
|
+
And I list pipelines
|
|
13
|
+
Then the list should contain the pipeline
|
|
14
|
+
And I pause the pipeline
|
|
15
|
+
And I read the pipeline
|
|
16
|
+
Then the pipeline status should be "Paused"
|
|
17
|
+
And I delete the pipeline
|
|
18
|
+
And I delete the bucket
|
|
19
|
+
And I delete the IAM role
|
|
20
|
+
|
|
21
|
+
@error
|
|
22
|
+
Scenario: Error handling
|
|
23
|
+
Given I create an Elastic Transcoder pipeline with name prefix ""
|
|
24
|
+
Then the error code should be "ValidationException"
|