[Brightbox] Correct server snapshot test
Had a mistake in it was trying to use the Server's ID for the get image request and resulted in calling destroy on a nil. Also had to add a wait since the API does not allow deleting an image that is being prepared.
This commit is contained in:
parent
e7313e555f
commit
41b0a3e754
|
@ -64,8 +64,10 @@ Shindo.tests('Fog::Compute[:brightbox] | server requests', ['brightbox']) do
|
||||||
pending if Fog.mocking?
|
pending if Fog.mocking?
|
||||||
result = Fog::Compute[:brightbox].snapshot_server(server_id)
|
result = Fog::Compute[:brightbox].snapshot_server(server_id)
|
||||||
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
formats(Brightbox::Compute::Formats::Full::SERVER, false) { result }
|
||||||
snapshot_id = result["id"]
|
# Server should be exclusively for our test so assume we can delete the snapshot
|
||||||
|
snapshot_id = result["snapshots"].first["id"]
|
||||||
@snapshot = Fog::Compute[:brightbox].images.get(snapshot_id)
|
@snapshot = Fog::Compute[:brightbox].images.get(snapshot_id)
|
||||||
|
@snapshot.wait_for { ready? }
|
||||||
@snapshot.destroy
|
@snapshot.destroy
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue