mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[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
1 changed files with 3 additions and 1 deletions
|
@ -64,8 +64,10 @@ Shindo.tests('Fog::Compute[:brightbox] | server requests', ['brightbox']) do
|
|||
pending if Fog.mocking?
|
||||
result = Fog::Compute[:brightbox].snapshot_server(server_id)
|
||||
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.wait_for { ready? }
|
||||
@snapshot.destroy
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue