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

Modified Fog::Compute::RackspaceV2 destroy image test from test setup

This commit is contained in:
Kyle Rames 2012-12-13 13:34:58 -06:00
parent b2e542d7a3
commit 2f2d602866

View file

@ -12,17 +12,17 @@ Shindo.tests('Fog::Compute::RackspaceV2 | image', ['rackspace']) do
tests("success") do
tests("destroy").succeeds do
begin
server = service.servers.create(options)
server.wait_for { ready? }
image_id = server.create_image("fog_image_#{test_time}")
image = service.images.get(image_id)
begin
server = service.servers.create(options)
server.wait_for { ready? }
image_id = server.create_image("fog_image_#{test_time}")
image = service.images.get(image_id)
tests("destroy").succeeds do
image.destroy
ensure
server.destroy if server
end
ensure
server.destroy if server
end
end
end
end