diff --git a/features/s3/objects.feature b/features/s3/objects.feature index 4e85169a70..6927691481 100644 --- a/features/s3/objects.feature +++ b/features/s3/objects.feature @@ -44,11 +44,12 @@ Feature: Working with Objects in S3 Then the object "byebye" should contain "world" Then I delete the object "byebye" - @unauthenticated - Scenario: Unauthenticated requests - When I put "world" to the public key "hello" - And I make an unauthenticated request to read object "hello" + @private + Scenario: Private ACL + When I put "world" to the private key "hello" + Then I get the object "hello" Then the object "hello" should contain "world" + Then I delete the object "hello" @blank Scenario: Putting nothing to an object diff --git a/features/s3/step_definitions/objects.js b/features/s3/step_definitions/objects.js index 8524884142..9f392f5fe8 100644 --- a/features/s3/step_definitions/objects.js +++ b/features/s3/step_definitions/objects.js @@ -246,11 +246,8 @@ module.exports = function () { req.send(callback); }); - this.When(/^I put "([^"]*)" to the (public|private) key "([^"]*)"$/, function(data, access, key, next) { - var acl; - if (access === 'public') acl = 'public-read'; - else if (access === 'private') acl = access; - var params = {Bucket: this.sharedBucket, Key: key, Body: data, ACL: acl}; + this.When(/^I put "([^"]*)" to the private key "([^"]*)"$/, function(data, key, next) { + var params = {Bucket: this.sharedBucket, Key: key, Body: data, ACL: 'private'}; this.request('s3', 'putObject', params, next); }); @@ -275,15 +272,6 @@ module.exports = function () { this.request('s3', 'getObject', params, next); }); - this.Then(/^I make an unauthenticated request to read object "([^"]*)"$/, function(key, next) { - var params = {Bucket: this.sharedBucket, Key: key}; - this.s3.makeUnauthenticatedRequest('getObject', params, function (err, data) { - if (err) return next(err); - this.data = data; - next(); - }.bind(this)); - }); - this.Given(/^I generate the MD5 checksum of "([^"]*)"$/, function(data, next) { this.sentContentMD5 = this.AWS.util.crypto.md5(data, 'base64'); next();