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

[aws|compute] remove brittle instance tests which rely on tests running fast

p.s. these fail on travis-ci
This commit is contained in:
geemus 2012-08-16 16:12:37 -05:00
parent 034bf32be4
commit 732fad312d

View file

@ -180,21 +180,6 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
data
end
if Fog.mocking?
# Ensure the new instance doesn't show up in mock describe_instances right away
tests("#describe_instances").formats(@describe_instances_format) do
body = Fog::Compute[:aws].describe_instances.body
instance_ids = body['reservationSet'].map {|reservation| reservation['instancesSet'].map {|instance| instance['instanceId'] } }.flatten
test("doesn't include the new instance") { !instance_ids.include?(@instance_id) }
body
end
# But querying for the new instance directly should raise an error
tests("#describe_instances('instance-id' => '#{@instance_id}')").raises(Fog::Compute::AWS::NotFound) do
Fog::Compute[:aws].describe_instances('instance-id' => @instance_id)
end
end
server = Fog::Compute[:aws].servers.get(@instance_id)
while server.nil? do
# It may take a moment to get the server after launching it