Skip to content

Commit

Permalink
Update CloudFormation integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaManohar committed Jun 24, 2015
1 parent deb5407 commit 1ae01d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/cloudformation/cloudformation.feature
Expand Up @@ -17,5 +17,5 @@ Feature: AWS CloudFormation
@pagination
Scenario: Paginating responses
Given I paginate the "listStacks" operation
Then I should get 1 pages
Then I should get at least one page
And the last page should not contain a marker
7 changes: 6 additions & 1 deletion features/extra/hooks.js
Expand Up @@ -13,7 +13,7 @@ module.exports = function () {
if (this.sharedBucket) return callback();

this.sharedBucket = this.uniqueName('aws-sdk-js-shared-integration');
this.request('s3', 'createBucket', {Bucket: this.sharedBucket}, function(err, data) {
this.request('s3', 'createBucket', {Bucket: this.sharedBucket}, function(err) {
this.cacheBucketName(this.sharedBucket);
if (err) callback.fail(err);
else callback();
Expand Down Expand Up @@ -136,6 +136,11 @@ module.exports = function () {
callback();
});

this.Then(/^I should get at least one page$/, function(callback) {
this.assert.compare(this.numPages, '>=', 1);
callback();
});

this.Then(/^I should get (\d+) pages$/, function(numPages, callback) {
this.assert.equal(this.numPages, parseInt(numPages));
callback();
Expand Down

0 comments on commit 1ae01d5

Please sign in to comment.