diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 13:37:47 +0000 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/spec_helper.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) | |
download | gitlab-ce-aee0a117a889461ce8ced6fcf73207fe017f1d99.tar.gz |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 17 |
1 files changed, 13 insertions, 4 deletions
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 |