diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-04 14:07:17 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-04 14:07:17 +0200 |
commit | f9228f6bf46f1d1caa4c62b80b8bd6ec883d33ae (patch) | |
tree | bbff1d0a978a3bd5a17bb830bbb278f0ee955546 /spec/migrations | |
parent | d60ce6e9f44eba769a6ad595014ae96095169dd2 (diff) | |
download | gitlab-ce-f9228f6bf46f1d1caa4c62b80b8bd6ec883d33ae.tar.gz |
Add a test for stage status migration with retried jobs
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/migrate_stages_statuses_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb index 95fa2977b31..81bc38fea10 100644 --- a/spec/migrations/migrate_stages_statuses_spec.rb +++ b/spec/migrations/migrate_stages_statuses_spec.rb @@ -24,6 +24,7 @@ describe MigrateStagesStatuses, :migration do create_job(project: 1, pipeline: 1, stage: 'build', status: 'failed') create_job(project: 2, pipeline: 2, stage: 'test', status: 'success') create_job(project: 2, pipeline: 2, stage: 'test', status: 'success') + create_job(project: 2, pipeline: 2, stage: 'test', status: 'failed', retried: true) stages.create!(id: 1, pipeline_id: 1, project_id: 1, name: 'test', status: nil) stages.create!(id: 2, pipeline_id: 1, project_id: 1, name: 'build', status: nil) @@ -40,10 +41,9 @@ describe MigrateStagesStatuses, :migration do .to eq [STATUSES[:running], STATUSES[:failed], STATUSES[:success]] end - def create_job(project:, pipeline:, stage:, status:) - stage_idx = STAGES[stage.to_sym] - + def create_job(project:, pipeline:, stage:, status:, **opts) jobs.create!(project_id: project, commit_id: pipeline, - stage_idx: stage_idx, stage: stage, status: status) + stage_idx: STAGES[stage.to_sym], stage: stage, + status: status, **opts) end end |