Sha256: 64032c31e18a5f2179a3ae9fe059f8a566aa768bc27eb1123e8f43e8d2a7d8a8

Contents?: true

Size: 1.72 KB

Versions: 65

Compression:

Stored size: 1.72 KB

Contents

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

  pools = Fog::Compute[:xenserver].pools
  pool = pools.first

  tests('The Pool model should') do
    tests('have the action') do
      test('reload') { pool.respond_to? 'reload' }
    end
    tests('have attributes') do
      model_attribute_hash = pool.attributes
      attributes = [ 
        :reference,
        :uuid,
        :name,
        :description,
        :__default_sr,
        :__master,
        :tags,
        :restrictions,
        :ha_enabled,
        :vswitch_controller,
        :__suspend_image_sr
      ]
      tests("The Pool model should respond to") do
        attributes.each do |attribute|
          test("#{attribute}") { pool.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::Pool') { pool.kind_of? Fog::Compute::XenServer::Pool}

  end

  tests("A real Pool should") do
    tests("return a valid default_storage_repository") do
      test("should be a Fog::Compute::XenServer::StorageRepository") { pool.default_storage_repository.kind_of? Fog::Compute::XenServer::StorageRepository }
    end
    tests("return valid Host as the master") do
      test("should be a Fog::Compute::XenServer::Host") { pool.master.kind_of? Fog::Compute::XenServer::Host }
    end
    test("be able to be configured as a valid suspend_image_sr") do
      pool.suspend_image_sr = pool.default_storage_repository
      pool.reload
      pool.suspend_image_sr.reference == pool.default_storage_repository.reference
    end

  end

end

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-maestrodev-1.15.0.20130927082724 tests/xenserver/models/compute/pool_tests.rb
fog-maestrodev-1.15.0.20130829165835 tests/xenserver/models/compute/pool_tests.rb
fog-1.15.0 tests/xenserver/models/compute/pool_tests.rb
gapinc-fog-1.14.0 tests/xenserver/models/compute/pool_tests.rb
fog-maestrodev-1.14.0.20130806165225 tests/xenserver/models/compute/pool_tests.rb
fog-1.14.0 tests/xenserver/models/compute/pool_tests.rb
fog-1.13.0 tests/xenserver/models/compute/pool_tests.rb
gapinc-fog-1.12.1.2 tests/xenserver/models/compute/pool_tests.rb
gapinc-fog-1.12.1.1 tests/xenserver/models/compute/pool_tests.rb
gapinc-fog-1.12.1a tests/xenserver/models/compute/pool_tests.rb
gapinc-fog-1.12.1 tests/xenserver/models/compute/pool_tests.rb
fog-1.12.1 tests/xenserver/models/compute/pool_tests.rb
fog-1.12.0 tests/xenserver/models/compute/pool_tests.rb
hpfog-0.0.20 tests/xenserver/models/compute/pool_tests.rb
vagrant-shell-0.2.6 vendor/bundle/gems/fog-1.10.1/tests/xenserver/models/compute/pool_tests.rb
vagrant-shell-0.2.5 vendor/bundle/gems/fog-1.10.1/tests/xenserver/models/compute/pool_tests.rb
fog-1.11.1 tests/xenserver/models/compute/pool_tests.rb
fog-1.11.0 tests/xenserver/models/compute/pool_tests.rb
fog-1.10.1 tests/xenserver/models/compute/pool_tests.rb
fog-test-me-1.10.0 tests/xenserver/models/compute/pool_tests.rb