diff --git a/.travis.yml b/.travis.yml index 6862e8cc..9e47745c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,6 +37,10 @@ matrix: env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec rvm: 2.5.3 stage: spec + - + env: FACTER_GEM_VERSION='~> 3.11.0' PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec + rvm: 2.5.3 + stage: spec - env: DEPLOY_TO_FORGE=yes stage: deploy diff --git a/lib/facter/lvm_support.rb b/lib/facter/lvm_support.rb index 64ce7107..318e8e31 100644 --- a/lib/facter/lvm_support.rb +++ b/lib/facter/lvm_support.rb @@ -1,7 +1,9 @@ # lvm_support: true/nil # Whether there is LVM support (based on the presence of the "vgs" command) Facter.add('lvm_support') do - confine kernel: :linux + confine do + Facter.value('kernel') == 'Linux' + end setcode do vgdisplay = Facter::Util::Resolution.which('vgs') diff --git a/spec/unit/facter/lvm_support_spec.rb b/spec/unit/facter/lvm_support_spec.rb index b529b721..56bd2cf0 100644 --- a/spec/unit/facter/lvm_support_spec.rb +++ b/spec/unit/facter/lvm_support_spec.rb @@ -7,7 +7,7 @@ end context 'when not on Linux' do - it 'is set to not' do + it 'is set to nil' do Facter.fact(:kernel).expects(:value).at_least(1).returns('SunOs') Facter.value(:lvm_support).should be_nil end