fog/fog — pull request #3251 by fcheung (2014-11-07 15:13:43+00:00)
Title: [Openstack|Compute] fix randomly failing spec

The security group failure tests have been failing randomly. This happens
because the random id assigned by the create security group mock can collide
with the id (0) of the default security group. The mock data stores the keys
as strings (except) for the default one, meaning that you end up with 2
security groups with id 0, one stored under the key 0 and the other
under the key '0'

I've addressed this by storing the default group as '0' (so that it can
be retrieved properly) and also by changing the create security group mock
so that it will never assign the id 0

I'm not an openstack user, so review appreciated - just want to stop random
build failures. It also occurs to me that perhaps the mock should take
steps to make duplicate ids impossible - could lead to some hard to reproduce problems if you were using the mocks.