Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-06 15:08:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-06 15:08:38 +0300
commit6ab9cdec264a9caf7e4eb5519fcae5ac65a18b15 (patch)
tree28afca02f01c1b9d22a5e4227521a575fae57bea /spec/rubocop/cop/migration
parent497d517e130ac88cbdee69c4c9e88938e164fc52 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop/cop/migration')
-rw-r--r--spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb
index b43d44dba65..aaf191a1b6b 100644
--- a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb
+++ b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb
@@ -36,5 +36,15 @@ RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop
expect(cop.offenses).to be_empty
end
+
+ it 'does not register an offense when `add_foreign_key` is within `with_lock_retries`' do
+ inspect_source <<~RUBY
+ with_lock_retries do
+ add_foreign_key :key, :projects, column: :project_id, on_delete: :cascade
+ end
+ RUBY
+
+ expect(cop.offenses).to be_empty
+ end
end
end