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

[storm_on_demand|compute] fixes for tests

This commit is contained in:
geemus 2011-05-10 16:52:43 -07:00
parent f2a32fd804
commit c1c1ffb63a
3 changed files with 6 additions and 6 deletions

View file

@ -37,7 +37,7 @@ module Fog
load(data)
end
def delete
def destroy
requires :identity
connection.delete_server(:uniq_id => identity)
true

View file

@ -110,8 +110,8 @@ module Fog
unless response.body.empty?
response.body = JSON.parse(response.body)
end
if response.body.keys[0] == 'error_class'
raise Fog::StormOnDemand::Compute::Error, response.body.inspect
if response.body.keys.include?('full_error')
raise(Fog::StormOnDemand::Compute::Error, response.body.inspect)
end
response
end

View file

@ -44,12 +44,12 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
end
unless Fog.mocking?
StormOnDemand[:compute].servers.get(:uniq_id => @uniq_id).wait_for { ready? }
StormOnDemand[:compute].servers.get(@uniq_id).wait_for { ready? }
end
tests("#delete_server(:uniq_id => #{@uniq_id})").succeeds do
pending if Fog.mocking?
StormOnDemand[:compute].delete_server(@uniq_id)
StormOnDemand[:compute].delete_server(:uniq_id => @uniq_id)
end
end
@ -57,7 +57,7 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
tests('failure') do
tests('#delete_server(0)').raises(Fog::StormOnDemand::Compute::Error) do
pending if Fog.mocking?
StormOnDemand[:compute].delete_server(0)
StormOnDemand[:compute].delete_server(:uniq_id => 'XXXXXX')
end
end