diff --git a/spec/unit/facts/megaraid_adapters_spec.rb b/spec/unit/facts/megaraid_adapters_spec.rb index 99d120f..ded8ec6 100644 --- a/spec/unit/facts/megaraid_adapters_spec.rb +++ b/spec/unit/facts/megaraid_adapters_spec.rb @@ -17,7 +17,7 @@ it do Facter.fact(:kernel).stubs(:value).returns('Linux') Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli') - Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1'). + Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1'). returns(nil) Facter.fact(:megaraid_adapters).value.should == '0' @@ -28,7 +28,7 @@ it 'should find 0 adapters' do Facter.fact(:kernel).stubs(:value).returns('Linux') Facter::Util::Resolution.stubs(:which).with('MegaCli').returns('/usr/bin/MegaCli') - Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1'). + Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1'). returns(File.read(fixtures('megacli', 'adpcount-count_0'))) Facter.fact(:megaraid_adapters).value.should == '0' @@ -37,7 +37,7 @@ it 'should find 1 adapters' do Facter.fact(:kernel).stubs(:value).returns('Linux') Facter::Util::Resolution.stubs(:which).with('MegaCli').returns('/usr/bin/MegaCli') - Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1'). + Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1'). returns(File.read(fixtures('megacli', 'adpcount-count_1'))) Facter.fact(:megaraid_adapters).value.should == '1' diff --git a/spec/unit/facts/megaraid_physical_drives_spec.rb b/spec/unit/facts/megaraid_physical_drives_spec.rb index ad320ba..8fb715a 100644 --- a/spec/unit/facts/megaraid_physical_drives_spec.rb +++ b/spec/unit/facts/megaraid_physical_drives_spec.rb @@ -26,7 +26,7 @@ Facter.fact(:kernel).stubs(:value).returns('Linux') Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli') Facter.fact(:megaraid_adapters).stubs(:value).returns('1') - Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL'). + Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL -NoLog'). returns(nil) Facter.fact(:megaraid_physical_drives).value.should be_nil @@ -48,7 +48,7 @@ Facter.fact(:kernel).stubs(:value).returns('Linux') Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli') Facter.fact(:megaraid_adapters).stubs(:value).returns('1') - Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL'). + Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL -NoLog'). returns(File.read(fixtures('megacli', 'pdlistaall'))) Facter.fact(:megaraid_physical_drives).value.should == '10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,184,185,188,189,190,192,194,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214'