Skip to content

Commit

Permalink
Merge pull request #2753 from bastelfreak/arch
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcooper authored Sep 6, 2024
2 parents 5550a89 + 1bf9371 commit 400e1ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/framework/detector/os_detector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
before do
RbConfig::CONFIG['host_os'] = 'linux'

# OS detected for Devuan and Arch Linux is special, so we need to explicitly stub it
# See https://github.com/puppetlabs/facter/issues/2752
allow(File).to receive(:readable?).with('/etc/devuan_version').and_return(false)
allow(File).to receive(:readable?).with('/etc/arch-release').and_return(false)
allow(Facter::Resolvers::OsRelease).to receive(:resolve).with(:id)
allow(Facter::Resolvers::RedHatRelease).to receive(:resolve).with(:id).and_return(:redhat)
allow(Facter::Resolvers::SuseRelease).to receive(:resolve).with(:id)
Expand Down

0 comments on commit 400e1ca

Please sign in to comment.