diff options
Diffstat (limited to 'spec/support/fast_quarantine.rb')
-rw-r--r-- | spec/support/fast_quarantine.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/support/fast_quarantine.rb b/spec/support/fast_quarantine.rb index b5ed1a2aa96..9732a287cb2 100644 --- a/spec/support/fast_quarantine.rb +++ b/spec/support/fast_quarantine.rb @@ -7,10 +7,9 @@ return if ENV['CI_MERGE_REQUEST_LABELS'].to_s.include?('pipeline:run-flaky-tests require_relative '../../tooling/lib/tooling/fast_quarantine' RSpec.configure do |config| - fast_quarantine_local_path = ENV.fetch('RSPEC_FAST_QUARANTINE_LOCAL_PATH', 'rspec/fast_quarantine-gitlab.txt') fast_quarantine_path = ENV.fetch( 'RSPEC_FAST_QUARANTINE_PATH', - File.expand_path("../../#{fast_quarantine_local_path}", __dir__) + File.expand_path("../../rspec/fast_quarantine-gitlab.txt", __dir__) ) fast_quarantine = Tooling::FastQuarantine.new(fast_quarantine_path: fast_quarantine_path) skipped_examples = [] @@ -28,10 +27,12 @@ RSpec.configure do |config| next if skipped_examples.empty? skipped_tests_report_path = ENV.fetch( - 'SKIPPED_TESTS_REPORT_PATH', + 'RSPEC_SKIPPED_TESTS_REPORT_PATH', File.expand_path("../../rspec/flaky/skipped_tests.txt", __dir__) ) + next warn("#{skipped_tests_report_path} doesn't exist!") unless File.exist?(skipped_tests_report_path.to_s) + File.write(skipped_tests_report_path, "#{ENV.fetch('CI_JOB_URL', 'local-run')}\n#{skipped_examples.join("\n")}\n\n") end end |