Sha256: e3c87129ad9b37787ec009992f08e72cf5a616c21fe0650952e82ed30be090b6

Contents?: true

Size: 874 Bytes

Versions: 18

Compression:

Stored size: 874 Bytes

Contents

Shindo.tests("Fog::Compute[:vsphere] | vm_create request", 'vsphere') do
  #require 'guid'
  path = "/Datacenters/Solutions"
  compute = Fog::Compute[:vsphere]

  tests("The return value should") do
    response = compute.vm_create('path' => path, 'name' => 'fog_test_vm', 'cluster' => 'cluster01')
    test("be a kind of Hash") { response.kind_of? Hash }
    %w{ vm_ref task_ref }.each do |key|
      test("have a #{key} key") { response.has_key? key }
    end
  end
  tests("When invalid input is presented") do
    raises(ArgumentError, 'it should raise ArgumentError') { compute.vm_create(:foo => 1) }
    raises(Fog::Compute::Vsphere::NotFound, 'it should raise Fog::Compute::Vsphere::NotFound when the UUID is not a string') do
      pending # require 'guid'
      compute.vm_create('instance_uuid' => Guid.from_s(template), 'name' => 'jefftestfoo')
    end
  end
end

Version data entries

18 entries across 18 versions & 9 rubygems

Version Path
fog-parser-fix-1.6.1 tests/vsphere/requests/compute/vm_create_tests.rb
fog-test-again-1.6.0 tests/vsphere/requests/compute/vm_create_tests.rb
fog-parser-fix-1.6.0 tests/vsphere/requests/compute/vm_create_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.7.0 tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.6.0 tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.5.0 tests/vsphere/requests/compute/vm_create_tests.rb
rackspace-fog-1.4.2 tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.4.0 tests/vsphere/requests/compute/vm_create_tests.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_create_tests.rb
michiels-fog-1.3.1 tests/vsphere/requests/compute/vm_create_tests.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/vsphere/requests/compute/vm_create_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.3.1 tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.3.0 tests/vsphere/requests/compute/vm_create_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/vsphere/requests/compute/vm_create_tests.rb
fog-1.2.0 tests/vsphere/requests/compute/vm_create_tests.rb
ktheory-fog-1.1.2 tests/vsphere/requests/compute/vm_create_tests.rb