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

There appears to be a number of bugs in the CloudSigma mock interface. The `snapshots` key is `nil` and adding a new snapshot fails. Working around that, the tests timeout because there is no mechanism to change the snapshots state from "creating" so it never becomes `available?`
25 lines
707 B
Ruby
25 lines
707 B
Ruby
Shindo.tests('Fog::Compute[:cloudsigma] | snapshot model', ['cloudsigma']) do
|
|
pending if Fog.mocking?
|
|
|
|
volume = Fog::Compute[:cloudsigma].volumes.create(:name => 'fogmodeltest', :size => 1024**3, :media => :disk)
|
|
volume.wait_for { available? } unless Fog.mocking?
|
|
|
|
snapshots = Fog::Compute[:cloudsigma].snapshots
|
|
snapshot_create_args = {:name => 'fogtest', :drive => volume.uuid}
|
|
|
|
model_tests(snapshots, snapshot_create_args, true) do
|
|
@instance.wait_for(timeout=60) { available? }
|
|
|
|
tests('#update').succeeds do
|
|
@instance.name = 'fogtest_renamed'
|
|
@instance.save
|
|
|
|
@instance.reload
|
|
|
|
returns('fogtest_renamed') { @instance.name }
|
|
end
|
|
end
|
|
|
|
volume.destroy
|
|
|
|
end
|