Skip to content

Commit

Permalink
address failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzdeee committed Nov 18, 2023
1 parent 1858a9e commit 7c7d621
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/facter/util/facts/posix/virtual_detector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ module Posix
module VirtualDetector
class << self
def platform
@@fact_value ||= check_docker_lxc || check_freebsd || check_gce || retrieve_from_virt_what
@@fact_value ||= check_docker_lxc || check_freebsd || check_openbsd || check_gce || retrieve_from_virt_what
@@fact_value ||= check_vmware || check_open_vz || check_vserver || check_xen || check_other_facts
@@fact_value ||= check_openbsd || check_lspci || 'physical'
@@fact_value ||= check_lspci || 'physical'

@@fact_value
end
Expand Down
2 changes: 2 additions & 0 deletions spec/facter/util/facts/posix/virtual_detector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

before do
allow(Facter::Resolvers::Containers).to receive(:resolve).with(:vm).and_return(nil)
allow(Facter::Resolvers::Freebsd::Virtual).to receive(:resolve).with(:vm).and_return(nil)
allow(Facter::Resolvers::Openbsd::Virtual).to receive(:resolve).with(:vm).and_return('vmm')
end

Expand All @@ -72,6 +73,7 @@
before do
allow(Facter::Resolvers::Containers).to receive(:resolve).with(:vm).and_return(nil)
allow(Facter::Resolvers::Freebsd::Virtual).to receive(:resolve).with(:vm).and_return(nil)
allow(Facter::Resolvers::Openbsd::Virtual).to receive(:resolve).with(:vm).and_return(nil)
allow(Facter::Resolvers::Linux::DmiBios).to receive(:resolve).with(:bios_vendor).and_return('Google Engine')
end

Expand Down

0 comments on commit 7c7d621

Please sign in to comment.