[aws|compute] remove brittle instance tests which rely on tests running fast
p.s. these fail on travis-ci
This commit is contained in:
parent
034bf32be4
commit
732fad312d
|
@ -180,21 +180,6 @@ Shindo.tests('Fog::Compute[:aws] | instance requests', ['aws']) do
|
||||||
data
|
data
|
||||||
end
|
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)
|
server = Fog::Compute[:aws].servers.get(@instance_id)
|
||||||
while server.nil? do
|
while server.nil? do
|
||||||
# It may take a moment to get the server after launching it
|
# It may take a moment to get the server after launching it
|
||||||
|
|
Loading…
Reference in New Issue