1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fix mock for put_container to reflect new acl changes.

This commit is contained in:
Rupak Ganguly 2012-10-19 01:35:06 -04:00
parent ed11924172
commit c4ecfc9357

View file

@ -22,16 +22,16 @@ module Fog
class Mock # :nodoc:all
def put_container(container_name, options = {})
acl = options['X-Container-Read'] || 'private'
if !['private', 'public-read'].include?(acl)
#raise Excon::Errors::BadRequest.new('invalid X-Container-Read')
else
self.data[:acls][:container][container_name] = self.class.acls(acl)
read_h = options['X-Container-Read'] || ''
write_h = options['X-Container-Write'] || ''
unless options
read_acl, write_acl = self.class.header_to_perm_acl(read_h, write_h)
self.data[:acls][:container][container_name] = {:read_acl => read_acl, :write_acl => write_acl}
end
response = Excon::Response.new
container = {
:objects => {},
:objects => {}
}
if self.data[:containers][container_name]
response.status = 202