From 7c7d621c144fbe41b2755a96491bb63b3745980c Mon Sep 17 00:00:00 2001 From: Sebastian Reitenbach Date: Sat, 18 Nov 2023 23:21:23 +0100 Subject: [PATCH] address failing tests --- lib/facter/util/facts/posix/virtual_detector.rb | 4 ++-- spec/facter/util/facts/posix/virtual_detector_spec.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/facter/util/facts/posix/virtual_detector.rb b/lib/facter/util/facts/posix/virtual_detector.rb index 24bf14e4f2..fae5cec65c 100644 --- a/lib/facter/util/facts/posix/virtual_detector.rb +++ b/lib/facter/util/facts/posix/virtual_detector.rb @@ -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 diff --git a/spec/facter/util/facts/posix/virtual_detector_spec.rb b/spec/facter/util/facts/posix/virtual_detector_spec.rb index efe67dc52b..dc7dbf416f 100644 --- a/spec/facter/util/facts/posix/virtual_detector_spec.rb +++ b/spec/facter/util/facts/posix/virtual_detector_spec.rb @@ -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 @@ -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