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