use ENV['ERROR_CONTEXT_BASE_PATH'] to determine junit reporting

This commit is contained in:
James Butters 2021-11-10 13:49:39 -07:00
parent 577c3095c5
commit 70942f7de7
2 changed files with 9 additions and 1 deletions

View File

@ -17,9 +17,16 @@ module RSpecQ
super(output_file)
end
def example_passed(notification)
# if it is a requeued run, store the notification
if !ENV["ERROR_CONTEXT_BASE_PATH"].nil?
@requeued_examples << notification.example
end
end
def example_failed(notification)
# if it is a requeued run, store the notification
if @queue.is_requeue(notification.example.id)
if !ENV["ERROR_CONTEXT_BASE_PATH"].nil?
@requeued_examples << notification.example
end
end

View File

@ -126,6 +126,7 @@ module RSpecQ
puts
puts "Executing #{job}"
ENV["ERROR_CONTEXT_BASE_PATH"] = nil
unless queue.is_requeue(job).nil?
ENV["ERROR_CONTEXT_BASE_PATH"] = "/usr/src/app/log/spec_failures/Rerun_#{queue.is_requeue(job)}"
end