Commit c42e125f authored by Stan Hu's avatar Stan Hu

Avoid company name collisions in CRM fixture

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76313 added a
fixture that generated company names for every group in the system.
It's not too hard to generate a collision. We append an index to the
name to ensure there's no chance of a name collision.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/348229
parent 60010802
......@@ -12,10 +12,10 @@ class Gitlab::Seeder::Crm
def seed!
organization_ids = []
organizations_per_group.times do
organizations_per_group.times do |index|
organization_ids << ::CustomerRelations::Organization.create!(
group_id: group.id,
name: FFaker::Company.name
name: "#{FFaker::Company.name}-#{index}"
).id
print '.'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment