Sha256: cd3ea35c2ddf9341d19631790ca79e766f5ed1f796a01d597b89b59bd35fcd59

Contents?: true

Size: 729 Bytes

Versions: 6

Compression:

Stored size: 729 Bytes

Contents

Shindo.tests("Fog::Ovirt::Compute | update_volume request", ["ovirt"]) do
  compute = Fog::Ovirt::Compute.new
  compute.create_vm(:name => "fog-" + Time.now.to_i.to_s, :cluster_name => "Default") if compute.servers.all(:search => "fog-*").empty?
  vm_id = compute.servers.all(:search => "fog-*").last

  tests("The expected options") do
    raises(ArgumentError, "raises ArgumentError when vm id is missing") { compute.update_volume(nil, :id => 1) }
    raises(ArgumentError, "raises ArgumentError when disk_id option is missing") { compute.update_volume(1, :any => 1) }
  end

  tests("The response should") do
    response = compute.update_volume(vm_id, :id => 1)
    test("be a success") { response ? true : false }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-ovirt-1.2.5 tests/ovirt/requests/compute/v3/update_volume_tests.rb
fog-ovirt-1.2.4 tests/ovirt/requests/compute/v3/update_volume_tests.rb
fog-ovirt-1.2.3 tests/ovirt/requests/compute/v3/update_volume_tests.rb
fog-ovirt-1.2.2 tests/ovirt/requests/compute/v3/update_volume_tests.rb
fog-ovirt-1.2.1 tests/ovirt/requests/compute/v3/update_volume_tests.rb
fog-ovirt-1.2.0 tests/ovirt/requests/compute/v3/update_volume_tests.rb