Sha256: e2e28dde5b7916b57f2d5f664f1df1aecefcd70e45e11a181e34010ec288be20

Contents?: true

Size: 725 Bytes

Versions: 122

Compression:

Stored size: 725 Bytes

Contents

Shindo.tests("Fog::Compute[:libvirt] | create_domain request", 'libvirt') do

  compute = Fog::Compute[:libvirt]
  xml = compute.servers.new( :nics => [{:bridge => "br180"}]).to_xml

  tests("Create Domain") do
    response = compute.create_domain(xml)
    test("should be a kind of Libvirt::Domain") { response.kind_of?  Libvirt::Domain}
  end

  tests("Fail Creating Domain") do
    begin
      response = compute.create_domain(xml)
      test("should be a kind of Libvirt::Domain") { response.kind_of?  Libvirt::Domain} #mock never raise exceptions
    rescue => e
      #should raise vm name already exist exception.
      test("error should be a kind of Libvirt::Error") { e.kind_of?  Libvirt::Error}
    end
  end

end

Version data entries

122 entries across 122 versions & 17 rubygems

Version Path
fog-libvirt-0.13.1 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.13.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.12.2 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.12.1 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.12.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.11.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.10.1 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.10.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-csem-0.9.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.9.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.8.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.7.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.6.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.5.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.4.2 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.4.1 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.4.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.3.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.2.0 tests/libvirt/requests/compute/create_domain_tests.rb
fog-libvirt-0.1.0 tests/libvirt/requests/compute/create_domain_tests.rb