diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /spec/spec_helper.rb | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 11a83bd9501..11a45e005b8 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 @@ -208,6 +212,10 @@ RSpec.configure do |config| # for now whilst we migrate as much as we can over the GraphQL stub_feature_flags(merge_request_widget_graphql: false) + # Using FortiAuthenticator as OTP provider is disabled by default in + # tests, until we introduce it in user settings + stub_feature_flags(forti_authenticator: false) + enable_rugged = example.metadata[:enable_rugged].present? # Disable Rugged features by default @@ -225,7 +233,7 @@ RSpec.configure do |config| end # Enable Marginalia feature for all specs in the test suite. - allow(Gitlab::Marginalia).to receive(:cached_feature_enabled?).and_return(true) + Gitlab::Marginalia.enabled = true # Stub these calls due to being expensive operations # It can be reenabled for specific tests via: @@ -233,6 +241,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 |