Sha256: b2ff341f2588b7c89e6369e0c974831276bc9d9a9d3bce6fbdddf2870c3a5695

Contents?: true

Size: 1.46 KB

Versions: 78

Compression:

Stored size: 1.46 KB

Contents

Shindo.tests('Fog::Compute[:xenserver] | VIF model', ['xenserver']) do

  vifs = Fog::Compute[:xenserver].vifs
  vif = vifs.first

  tests('The VIF model should') do
    tests('have the action') do
      test('reload save destroy network server') { vif.respond_to? 'reload' }
    end
    tests('have attributes') do
      model_attribute_hash = vif.attributes
      attributes = [ 
        :reference,
        :mac,
        :uuid,
        :allowed_operations,
        :currently_attached,
        :device,
        :mac_autogenerated,
        :metrics,
        :mtu,
        :__network,
        :status_code,
        :status_detail,
        :__vm
      ]
      tests("The VIF model should respond to") do
        attributes.each do |attribute|
          test("#{attribute}") { vif.respond_to? attribute }
        end
      end
      tests("The attributes hash should have key") do
        attributes.each do |attribute|
          test("#{attribute}") { model_attribute_hash.has_key? attribute }
        end
      end
    end

    test('be a kind of Fog::Compute::XenServer::VIF') { vif.kind_of? Fog::Compute::XenServer::VIF}

  end

  tests("A real VIF should") do
    tests("return a valid network") do
      test("should be a Fog::Compute::XenServer::Network") { vif.network.kind_of? Fog::Compute::XenServer::Network }
    end
    tests("return valid VIF") do
      test("should be a Fog::Compute::XenServer::Server") { vif.server.kind_of? Fog::Compute::XenServer::Server }
    end

  end

end

Version data entries

78 entries across 78 versions & 11 rubygems

Version Path
fog-1.22.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.21.0 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/xenserver/models/compute/vif_tests.rb
fog-1.20.0 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/xenserver/models/compute/vif_tests.rb
fog-1.19.0 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/xenserver/models/compute/vif_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/xenserver/models/compute/vif_tests.rb