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

Move mock storage initialization and remove storage checks

This commit is contained in:
Chris Roberts 2013-10-28 13:50:59 -07:00
parent 7ad25c34ba
commit c3f6ae5253
4 changed files with 4 additions and 6 deletions

View file

@ -29,9 +29,7 @@ module Fog
def delete_bucket_tagging(bucket_name)
response = Excon::Response.new
if self.data[:buckets][bucket_name]
if self.data[:bucket_tagging]
self.data[:bucket_tagging].delete(bucket_name)
end
self.data[:bucket_tagging].delete(bucket_name)
response.status = 204
else
response.status = 404

View file

@ -37,7 +37,7 @@ module Fog
def get_bucket_tagging(bucket_name)
response = Excon::Response.new
if self.data[:buckets][bucket_name] && self.data[:bucket_tagging] && self.data[:bucket_tagging][bucket_name]
if self.data[:buckets][bucket_name] && self.data[:bucket_tagging][bucket_name]
response.status = 200
response.body = {'BucketTagging' => self.data[:bucket_tagging][bucket_name]}
else

View file

@ -43,7 +43,6 @@ DATA
response = Excon::Response.new
if self.data[:buckets][bucket_name]
self.data[:bucket_tagging] ||= {}
self.data[:bucket_tagging][bucket_name] = tags
response.status = 204
else

View file

@ -336,7 +336,8 @@ module Fog
:buckets => {},
:cors => {
:bucket => {}
}
},
:bucket_tagging => {}
}
end
end