diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-22 11:42:16 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-22 11:45:05 -0500 |
commit | 6331ddbe56a30b230935995d1daf644761f154eb (patch) | |
tree | 376facd3efa30bc592b010efe6696ea05357d5ce /db | |
parent | 3c6fee700d52db4da1b3662caf6e1dfe76f56977 (diff) | |
download | gitlab-ce-6331ddbe56a30b230935995d1daf644761f154eb.tar.gz |
CE pipelines don't respond to sourced_pipelinesrs-fixtures-parity
We also scope the `rescue`s to only those raised by ActiveRecord, which
would have allowed us to spot this logic error sooner.
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/14_pipelines.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/fixtures/development/14_pipelines.rb b/db/fixtures/development/14_pipelines.rb index ffba934021e..05bda7d3672 100644 --- a/db/fixtures/development/14_pipelines.rb +++ b/db/fixtures/development/14_pipelines.rb @@ -81,7 +81,7 @@ class Gitlab::Seeder::Pipelines @project.repository.commits('master', limit: 4).map do |commit| create_pipeline!(@project, 'master', commit).tap do |pipeline| random_pipeline.tap do |triggered_by_pipeline| - triggered_by_pipeline.sourced_pipelines.create( + triggered_by_pipeline.try(:sourced_pipelines)&.create( source_job: triggered_by_pipeline.builds.all.sample, source_project: triggered_by_pipeline.project, project: pipeline.project, @@ -89,7 +89,7 @@ class Gitlab::Seeder::Pipelines end end end - rescue + rescue ActiveRecord::ActiveRecordError [] end @@ -106,7 +106,7 @@ class Gitlab::Seeder::Pipelines end pipelines.flatten - rescue + rescue ActiveRecord::ActiveRecordError [] end |