Merge pull request #742 from puppetlabs/revert-720-postgresql_version_fact
Revert "Add postgresql_version fact"
This commit is contained in:
commit
88a9a042f3
2 changed files with 0 additions and 27 deletions
|
@ -1,8 +0,0 @@
|
|||
Facter.add(:postgresql_version) do
|
||||
setcode do
|
||||
if Facter::Util::Resolution.which('psql')
|
||||
postgresql_version = Facter::Util::Resolution.exec('psql -V 2>&1')
|
||||
%r{^psql \(PostgreSQL\) ([\w\.]+)}.match(postgresql_version)[1]
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Facter::Util::Fact do
|
||||
before do
|
||||
Facter.clear
|
||||
end
|
||||
|
||||
describe 'postgresql_version' do
|
||||
context 'with value' do
|
||||
before :each do
|
||||
allow(Facter::Util::Resolution).to receive(:which).with('psql').and_return(true)
|
||||
allow(Facter::Util::Resolution).to receive(:exec).with('psql -V 2>&1').and_return('psql (PostgreSQL) 9.4.5')
|
||||
end
|
||||
it do
|
||||
expect(Facter.fact(:postgresql_version).value).to eq('9.4.5')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue