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

[rackspace|compute_v2] fixing broken tests

This commit is contained in:
Kyle Rames 2013-09-04 15:25:18 -05:00
parent e0867dbabe
commit cf54ea8522
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@ module Fog
@@data ||= Hash.new do |hash, key|
hash[key] = begin
#Compute V2
flavor_id = Fog.credentials[:rackspace_flavor_id].to_s ||= Fog::Mock.random_numbers(1)
flavor_id = Fog.credentials[:rackspace_flavor_id] ||= Fog::Mock.random_numbers(1)
image_id = Fog.credentials[:rackspace_image_id] ||= Fog::Rackspace::MockData.uuid
image_name = Fog::Mock.random_letters(6)
network_id = Fog::Rackspace::MockData.uuid
@ -115,9 +115,9 @@ module Fog
mock_data = {
#Compute V2
:flavors => Hash.new { |h,k| h[k] = flavor unless k == NOT_FOUND_ID },
:images => Hash.new { |h,k| h[k] = image unless k == NOT_FOUND_ID },
:networks => Hash.new { |h,k| h[k] = network unless k == NOT_FOUND_ID },
:flavors => Hash.new { |h,k| h[k] = flavor unless [NOT_FOUND_ID, '0'].include?(k) },
:images => Hash.new { |h,k| h[k] = image unless [NOT_FOUND_ID, '0'].include?(k) },
:networks => Hash.new { |h,k| h[k] = network unless [NOT_FOUND_ID, '0'].include?(k) },
:keys => [],
:keypair => key_pair,
:keypairs => [],

View file

@ -123,6 +123,7 @@ def compute_providers
:provider_attributes => { :version => :v2 },
:server_attributes => {
:image_id => "23b564c9-c3e6-49f9-bc68-86c7a9ab5018", # Ubuntu 12.04 LTS (Precise Pangolin)
:flavor_id => 2,
:name => "fog_#{Time.now.to_i}"
},
:mocked => true