Skip to content
Browse files

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.
  • Loading branch information...
1 parent e4b382d commit db77300076a7fdb6344ea743e8b73486b5f26172 @dprince dprince committed Nov 29, 2012
2 lib/fog/openstack/requests/compute/create_security_group.rb
@@ -41,7 +41,7 @@ def create_security_group(name, description)
'Content-Length' => Fog::Mock.random_numbers(3).to_s,
'Date' =>}
response.body = {
- 'security_group' =>[:security_groups].values
+ 'security_group' =>[:security_groups][security_group_id]
2 tests/openstack/requests/compute/security_group_tests.rb
@@ -20,7 +20,7 @@
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

0 comments on commit db77300

Please sign in to comment.
Something went wrong with that request. Please try again.