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:
parent
7ad25c34ba
commit
c3f6ae5253
4 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -336,7 +336,8 @@ module Fog
|
|||
:buckets => {},
|
||||
:cors => {
|
||||
:bucket => {}
|
||||
}
|
||||
},
|
||||
:bucket_tagging => {}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue