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:
parent
f2a32fd804
commit
c1c1ffb63a
3 changed files with 6 additions and 6 deletions
|
@ -37,7 +37,7 @@ module Fog
|
||||||
load(data)
|
load(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete
|
def destroy
|
||||||
requires :identity
|
requires :identity
|
||||||
connection.delete_server(:uniq_id => identity)
|
connection.delete_server(:uniq_id => identity)
|
||||||
true
|
true
|
||||||
|
|
|
@ -110,8 +110,8 @@ module Fog
|
||||||
unless response.body.empty?
|
unless response.body.empty?
|
||||||
response.body = JSON.parse(response.body)
|
response.body = JSON.parse(response.body)
|
||||||
end
|
end
|
||||||
if response.body.keys[0] == 'error_class'
|
if response.body.keys.include?('full_error')
|
||||||
raise Fog::StormOnDemand::Compute::Error, response.body.inspect
|
raise(Fog::StormOnDemand::Compute::Error, response.body.inspect)
|
||||||
end
|
end
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
|
@ -44,12 +44,12 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
|
||||||
end
|
end
|
||||||
|
|
||||||
unless Fog.mocking?
|
unless Fog.mocking?
|
||||||
StormOnDemand[:compute].servers.get(:uniq_id => @uniq_id).wait_for { ready? }
|
StormOnDemand[:compute].servers.get(@uniq_id).wait_for { ready? }
|
||||||
end
|
end
|
||||||
|
|
||||||
tests("#delete_server(:uniq_id => #{@uniq_id})").succeeds do
|
tests("#delete_server(:uniq_id => #{@uniq_id})").succeeds do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
StormOnDemand[:compute].delete_server(@uniq_id)
|
StormOnDemand[:compute].delete_server(:uniq_id => @uniq_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -57,7 +57,7 @@ Shindo.tests('StormOnDemand::Compute | server requests', ['stormondemand']) do
|
||||||
tests('failure') do
|
tests('failure') do
|
||||||
tests('#delete_server(0)').raises(Fog::StormOnDemand::Compute::Error) do
|
tests('#delete_server(0)').raises(Fog::StormOnDemand::Compute::Error) do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
StormOnDemand[:compute].delete_server(0)
|
StormOnDemand[:compute].delete_server(:uniq_id => 'XXXXXX')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue