diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /spec/spec_helper.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 11a83bd9501..2962225859d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -66,7 +66,11 @@ RSpec.configure do |config| config.display_try_failure_messages = true config.infer_spec_type_from_file_location! - config.full_backtrace = !!ENV['CI'] + + # Add :full_backtrace tag to an example if full_backtrace output is desired + config.before(:each, full_backtrace: true) do |example| + config.full_backtrace = true + end unless ENV['CI'] # Re-run failures locally with `--only-failures` @@ -124,6 +128,7 @@ RSpec.configure do |config| config.include LoginHelpers, type: :feature config.include SearchHelpers, type: :feature config.include WaitHelpers, type: :feature + config.include WaitForRequests, type: :feature config.include EmailHelpers, :mailer, type: :mailer config.include Warden::Test::Helpers, type: :request config.include Gitlab::Routing, type: :routing @@ -133,7 +138,6 @@ RSpec.configure do |config| config.include InputHelper, :js config.include SelectionHelper, :js config.include InspectRequests, :js - config.include WaitForRequests, :js config.include LiveDebugger, :js config.include MigrationsHelpers, :migration config.include RedisHelpers @@ -233,6 +237,12 @@ RSpec.configure do |config| # expect(Gitlab::Git::KeepAround).to receive(:execute).and_call_original allow(Gitlab::Git::KeepAround).to receive(:execute) + # Stub these calls due to being expensive operations + # It can be reenabled for specific tests via: + # + # expect(Gitlab::JobWaiter).to receive(:wait).and_call_original + allow_any_instance_of(Gitlab::JobWaiter).to receive(:wait) + Gitlab::ProcessMemoryCache.cache_backend.clear Sidekiq::Worker.clear_all |