diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-11-14 16:43:04 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-11-15 20:25:30 +0300 |
commit | b3008a939dbf9de55fe066f4189f62083542e93b (patch) | |
tree | 26889f071b3018e5ecdf5e45002aa8ba60b2a90c /spec | |
parent | fac2242f3dc386184f4f7af79dd09f58a8025f67 (diff) |
Merge branch 'bvl-fork-network-memberships-for-deleted-source' into 'master'
Don't try to create fork network memberships for forks of forks
Closes #40072
See merge request gitlab-org/gitlab-ce!15366
(cherry picked from commit 3730d89fe8578ce827468ebebef9cd6e33ae89f4)
aaf18bb8 Don't try to create fork network memberships for forks of forks
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/background_migration/create_fork_network_memberships_range_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/lib/gitlab/background_migration/create_fork_network_memberships_range_spec.rb b/spec/lib/gitlab/background_migration/create_fork_network_memberships_range_spec.rb index 1a4ea2bac48..79d2c071446 100644 --- a/spec/lib/gitlab/background_migration/create_fork_network_memberships_range_spec.rb +++ b/spec/lib/gitlab/background_migration/create_fork_network_memberships_range_spec.rb @@ -93,7 +93,14 @@ describe Gitlab::BackgroundMigration::CreateForkNetworkMembershipsRange, :migrat end it 'knows it is finished for this range' do - expect(migration.missing_members?(1, 7)).to be_falsy + expect(migration.missing_members?(1, 8)).to be_falsy + end + + it 'does not miss members for forks of forks for which the root was deleted' do + forked_project_links.create(id: 9, forked_from_project_id: base1_fork1.id, forked_to_project_id: create(:project).id) + base1.destroy + + expect(migration.missing_members?(7, 10)).to be_falsy end context 'with more forks' do |