Skip to content

Commit 9e01df4

Browse files
committed
MODULES-10915: use facter 3 for spec test
This likely needs fixing in pdk or .sync but wanted to at least test the fix first
1 parent cada6d4 commit 9e01df4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ matrix:
3434
rvm: 2.4.5
3535
stage: spec
3636
-
37-
env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
37+
env: FACTER_GEM_VERSION='~> 3.11.0' PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec
3838
rvm: 2.5.3
3939
stage: spec
4040
-

lib/facter/lvm_support.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# lvm_support: true/nil
22
# Whether there is LVM support (based on the presence of the "vgs" command)
33
Facter.add('lvm_support') do
4-
confine kernel: :linux
4+
confine do
5+
Facter.value('kernel') == 'Linux'
6+
end
57

68
setcode do
79
vgdisplay = Facter::Util::Resolution.which('vgs')

spec/unit/facter/lvm_support_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
end
88

99
context 'when not on Linux' do
10-
it 'is set to not' do
10+
it 'is set to nil' do
1111
Facter.fact(:kernel).expects(:value).at_least(1).returns('SunOs')
1212
Facter.value(:lvm_support).should be_nil
1313
end

0 commit comments

Comments
 (0)