We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b2a864 commit d2db654Copy full SHA for d2db654
lib/facter/puppetdb_version.rb
@@ -3,11 +3,6 @@
3
4
setcode do
5
output = Facter::Core::Execution.execute('puppetdb --version')
6
-
7
- if output.nil?
8
- nil
9
- else
10
- output.split(':').last.strip
11
- end
+ output.split(':').last.strip
12
end
13
spec/unit/facter/puppetdb_version_spec.rb
@@ -22,11 +22,4 @@
22
23
expect(Facter.fact(:puppetdb_version).value).to be_nil
24
25
26
- it 'returns nil if puppetdb version output is nil' do
27
- allow(Facter::Util::Resolution).to receive(:which).with('puppetdb').and_return('/usr/bin/puppetdb')
28
- allow(Facter::Core::Execution).to receive(:execute).with('puppetdb --version').and_return(nil)
29
30
- expect(Facter.fact(:puppetdb_version).value).to be_nil
31
32
0 commit comments