Skip to content

Commit ad259bd

Browse files
dennisdegreefeputnam
authored andcommitted
Silence STDERR in Facter (#883)
* Silence STDERR in Facter * Alter test for previous change ( Silence STDERR in Facter)
1 parent 5e33c91 commit ad259bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/facter/mysqld_version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Facter.add("mysqld_version") do
22
setcode do
3-
Facter::Util::Resolution.exec('mysqld -V')
3+
Facter::Util::Resolution.exec('mysqld -V 2>/dev/null')
44
end
55
end

spec/unit/facter/mysqld_version_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
describe "mysqld_version" do
99
context 'with value' do
1010
before :each do
11-
Facter::Util::Resolution.stubs(:exec).with('mysqld -V').returns('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
11+
Facter::Util::Resolution.stubs(:exec).with('mysqld -V 2>/dev/null').returns('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')
1212
end
1313
it {
1414
expect(Facter.fact(:mysqld_version).value).to eq('mysqld Ver 5.5.49-37.9 for Linux on x86_64 (Percona Server (GPL), Release 37.9, Revision efa0073)')

0 commit comments

Comments
 (0)