1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
require 'spec_helper'
describe Specinfra::HostInventory::Virtualization do
before :all do
set :os, { :family => 'openbsd' }
end
virt = Specinfra::HostInventory::Virtualization.new(host_inventory)
let(:host_inventory) { nil }
it 'OpenBSD 5.7 on KVM should return :system => "kvm"' do
ret = virt.parse_system_product_name("KVM\n")
expect(ret).to include('kvm')
end
let(:host_inventory) { nil }
it 'OpenBSD 5.7 on VMware should return :system => "vmware"' do
ret = virt.parse_system_product_name("VMware Virtual Platform\n")
expect(ret).to include('vmware')
end
let(:host_inventory) { nil }
it 'OpenBSD 5.7 on VirtualBox should return :system => "vbox"' do
ret = virt.parse_system_product_name("VirtualBox\n")
expect(ret).to include('vbox')
end
end
|