Sha256: 4663dbfc43f1773cd841443c883339a5a577c0ad880abec933d2f2b3071fe416

Contents?: true

Size: 1.46 KB

Versions: 25

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.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

25 entries across 25 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/xenserver/models/compute/vif_tests.rb
fog-1.34.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.33.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.32.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.31.0 tests/xenserver/models/compute/vif_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/xenserver/models/compute/vif_tests.rb
fog-1.30.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.29.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.28.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.27.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.26.0 tests/xenserver/models/compute/vif_tests.rb
fog-1.25.0 tests/xenserver/models/compute/vif_tests.rb
nsidc-fog-1.24.1 tests/xenserver/models/compute/vif_tests.rb
fog-1.24.0 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.11 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.10 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.9 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.8 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.7 tests/xenserver/models/compute/vif_tests.rb
ns-fog-1.22.6 tests/xenserver/models/compute/vif_tests.rb