From aee0a117a889461ce8ced6fcf73207fe017f1d99 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 20 Dec 2021 13:37:47 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-6-stable-ee --- spec/spec_helper.rb | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'spec/spec_helper.rb') diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 52560f1f1c3..c497f8245fe 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -239,6 +239,7 @@ RSpec.configure do |config| # is not yet opened at the time that is triggered config.prepend_before do ApplicationRecord.set_open_transactions_baseline + ::Ci::ApplicationRecord.set_open_transactions_baseline end config.append_before do @@ -247,6 +248,7 @@ RSpec.configure do |config| config.append_after do ApplicationRecord.reset_open_transactions_baseline + ::Ci::ApplicationRecord.reset_open_transactions_baseline end config.before do |example| @@ -321,10 +323,6 @@ RSpec.configure do |config| # For more information check https://gitlab.com/gitlab-org/gitlab/-/issues/339348 stub_feature_flags(new_header_search: false) - # Disable the override flag in order to enable the feature by default. - # See https://docs.gitlab.com/ee/development/feature_flags/#selectively-disable-by-actor - stub_feature_flags(surface_environment_creation_failure_override: false) - allow(Gitlab::GitalyClient).to receive(:can_use_disk?).and_return(enable_rugged) else unstub_all_feature_flags @@ -454,6 +452,13 @@ RSpec.configure do |config| $stdout = StringIO.new end + # Makes diffs show entire non-truncated values. + config.before(:each, unlimited_max_formatted_output_length: true) do |_example| + config.expect_with :rspec do |c| + c.max_formatted_output_length = nil + end + end + config.after(:each, :silence_stdout) do $stdout = STDOUT end @@ -476,6 +481,10 @@ Rugged::Settings['search_path_global'] = Rails.root.join('tmp/tests').to_s # Initialize FactoryDefault to use create_default helper TestProf::FactoryDefault.init +# Exclude the Geo proxy API request from getting on_next_request Warden handlers, +# necessary to prevent race conditions with feature tests not getting authenticated. +::Warden.asset_paths << %r{^/api/v4/geo/proxy$} + module TouchRackUploadedFile def initialize_from_file_path(path) super -- cgit v1.2.3