Skip to content

Commit

Permalink
update spec
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Zaval <[email protected]>
  • Loading branch information
jazaval committed Nov 4, 2023
1 parent 4900de3 commit 2636450
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/unit/plugins/darwin/virtualization_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
allow(plugin).to receive(:docker_exists?).and_return(false)
plugin[:hardware] = Mash.new
plugin[:hardware][:boot_rom_version] = "not_a_vm"
plugin[:hardware][:machine_model] = "not_a_vm"
end

describe "when detecting OS X virtualization" do
Expand Down Expand Up @@ -181,5 +182,12 @@
plugin.run
expect(plugin[:virtualization]).to eq({ "systems" => {} })
end

it "sets apple guest if hardware attributes mention VirtualMac" do
plugin[:hardware][:machine_model] = "VirtualMac2,1"
plugin.run
expect(plugin[:virtualization][:system]).to eq("apple")
expect(plugin[:virtualization][:role]).to eq("guest")
end
end
end

0 comments on commit 2636450

Please sign in to comment.