File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 88 end
99
1010 def deprecation ( key , message )
11- stacktrace = Puppet ::Pops ::PuppetStack . stacktrace ( )
12- file = stacktrace [ 0 ]
13- line = stacktrace [ 1 ]
14- output_message = "#{ message } at #{ file } :#{ line } "
1511 # depending on configuration setting of strict
1612 case Puppet . settings [ :strict ]
1713 when :off
1814 # do nothing
1915 when :error
20- fail ( "deprecation. #{ key } . #{ output_message } " )
16+ fail ( "deprecation. #{ key } . #{ message } " )
2117 else
2218 unless ENV [ 'STDLIB_LOG_DEPRECATIONS' ] == 'false'
23- Puppet . deprecation_warning ( output_message , key )
19+ Puppet . deprecation_warning ( message , key )
2420 end
2521 end
2622 end
Original file line number Diff line number Diff line change 3131 end
3232
3333 it "should show the error message" do
34- expect ( @result . stderr ) . to match ( /deprecation. key. message at / )
34+ expect ( @result . stderr ) . to match ( /deprecation. key. message/ )
3535 end
3636
3737 describe file ( "#{ test_file } " ) do
5353 end
5454
5555 it "should show the error message" do
56- expect ( @result . stderr ) . to match ( /Warning: message at / )
56+ expect ( @result . stderr ) . to match ( /Warning: message/ )
5757 end
5858
5959 describe file ( "#{ test_file } " ) do
You can’t perform that action at this time.
0 commit comments