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

Merge pull request #3251 from fcheung/fix_flapping_test

[Openstack|Compute] fix randomly failing spec
This commit is contained in:
Wesley Beary 2014-11-07 17:28:34 -06:00
commit e7d28fe82c
2 changed files with 2 additions and 2 deletions

View file

@ -203,7 +203,7 @@ module Fog
:servers => {},
:key_pairs => {},
:security_groups => {
0 => {
'0' => {
"id" => 0,
"tenant_id" => Fog::Mock.random_hex(8),
"name" => "default",

View file

@ -23,7 +23,7 @@ module Fog
def create_security_group(name, description)
Fog::Identity::OpenStack.new(:openstack_auth_url => credentials[:openstack_auth_url])
tenant_id = Fog::Identity::OpenStack::Mock.data[current_tenant][:tenants].keys.first
security_group_id = Fog::Mock.random_numbers(2).to_i
security_group_id = Fog::Mock.random_numbers(2).to_i + 1
self.data[:security_groups][security_group_id.to_s] = {
'tenant_id' => tenant_id,
'rules' => [],