mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
OpenStack: security group test fixes.
Update the OpenStack security group test to support the correct format for create_security_group responses. This patch removes the extra [] wrapping the response and makes it so the real tests run once again. Also updates the existing Mock for create_security_response so it handles it properly as well.
This commit is contained in:
parent
e4b382d8ac
commit
db77300076
2 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ module Fog
|
|||
'Content-Length' => Fog::Mock.random_numbers(3).to_s,
|
||||
'Date' => Date.new}
|
||||
response.body = {
|
||||
'security_group' => self.data[:security_groups].values
|
||||
'security_group' => self.data[:security_groups][security_group_id]
|
||||
}
|
||||
response
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ Shindo.tests('Fog::Compute[:openstack] | security group requests', ['openstack']
|
|||
}
|
||||
|
||||
tests('success') do
|
||||
tests('#create_security_group(name, description)').formats({"security_group" => [@security_group_format]}) do
|
||||
tests('#create_security_group(name, description)').formats({"security_group" => @security_group_format}) do
|
||||
Fog::Compute[:openstack].create_security_group('from_shindo_test', 'this is from the shindo test').body
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue