File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 55 setcode do
66 apache_version = nil
77
8- if Facter ::Util :: Resolution . which ( 'httpd' )
9- apache_version = Facter ::Util :: Resolution . exec ( 'httpd -V 2>&1' )
8+ if Facter ::Core :: Execution . which ( 'httpd' )
9+ apache_version = Facter ::Core :: Execution . execute ( 'httpd -V 2>&1' )
1010 Facter . debug "Matching httpd '#{ apache_version } '"
11- elsif Facter ::Util :: Resolution . which ( 'apache2' )
12- apache_version = Facter ::Util :: Resolution . exec ( 'apache2 -V 2>&1' )
11+ elsif Facter ::Core :: Execution . which ( 'apache2' )
12+ apache_version = Facter ::Core :: Execution . execute ( 'apache2 -V 2>&1' )
1313 Facter . debug "Matching apache2 '#{ apache_version } '"
14- elsif Facter ::Util :: Resolution . which ( 'apachectl' )
15- apache_version = Facter ::Util :: Resolution . exec ( 'apachectl -v 2>&1' )
14+ elsif Facter ::Core :: Execution . which ( 'apachectl' )
15+ apache_version = Facter ::Core :: Execution . execute ( 'apachectl -v 2>&1' )
1616 Facter . debug "Matching apachectl '#{ apache_version } '"
17- elsif Facter ::Util :: Resolution . which ( 'apache2ctl' )
18- apache_version = Facter ::Util :: Resolution . exec ( 'apache2ctl -v 2>&1' )
17+ elsif Facter ::Core :: Execution . which ( 'apache2ctl' )
18+ apache_version = Facter ::Core :: Execution . execute ( 'apache2ctl -v 2>&1' )
1919 Facter . debug "Matching apache2ctl '#{ apache_version } '"
2020 end
2121
Original file line number Diff line number Diff line change 1010 context 'with value' do
1111 before :each do
1212 allow ( Facter . fact ( :kernel ) ) . to receive ( :value ) . and_return ( 'Linux' )
13- expect ( Facter ::Util :: Resolution ) . to receive ( :which ) . with ( 'httpd' ) { true }
14- expect ( Facter ::Util :: Resolution ) . to receive ( :exec ) . with ( 'httpd -V 2>&1' ) {
13+ expect ( Facter ::Core :: Execution ) . to receive ( :which ) . with ( 'httpd' ) { true }
14+ expect ( Facter ::Core :: Execution ) . to receive ( :execute ) . with ( 'httpd -V 2>&1' ) {
1515 'Server version: Apache/2.4.16 (Unix)
1616 Server built: Jul 31 2015 15:53:26'
1717 }
2626 context 'with value' do
2727 before :each do
2828 allow ( Facter . fact ( :kernel ) ) . to receive ( :value ) . and_return ( 'Linux' )
29- expect ( Facter ::Util :: Resolution ) . to receive ( :which ) . with ( 'httpd' ) { true }
30- expect ( Facter ::Util :: Resolution ) . to receive ( :exec ) . with ( 'httpd -V 2>&1' ) {
29+ expect ( Facter ::Core :: Execution ) . to receive ( :which ) . with ( 'httpd' ) { true }
30+ expect ( Facter ::Core :: Execution ) . to receive ( :execute ) . with ( 'httpd -V 2>&1' ) {
3131 'Server version: Apache/2.4.6 ()
3232 Server built: Nov 21 2015 05:34:59'
3333 }
You can’t perform that action at this time.
0 commit comments