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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-04 16:31:15 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-07-04 16:31:15 +0300
commita17c90b2a7331a7427813684b04095b55c4b3cc1 (patch)
treead76404a74e856a37bd5a01d95ea61f0155053d0 /spec/migrations/migrate_stages_statuses_spec.rb
parentf9228f6bf46f1d1caa4c62b80b8bd6ec883d33ae (diff)
Use enumerated status in persisted stage class
Diffstat (limited to 'spec/migrations/migrate_stages_statuses_spec.rb')
-rw-r--r--spec/migrations/migrate_stages_statuses_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb
index 81bc38fea10..478ddad262a 100644
--- a/spec/migrations/migrate_stages_statuses_spec.rb
+++ b/spec/migrations/migrate_stages_statuses_spec.rb
@@ -9,7 +9,6 @@ describe MigrateStagesStatuses, :migration do
STATUSES = { created: 0, pending: 1, running: 2, success: 3,
failed: 4, canceled: 5, skipped: 6, manual: 7 }
- STAGES = { test: 1, build: 2, deploy: 3}
before do
projects.create!(id: 1, name: 'gitlab1', path: 'gitlab1')
@@ -42,8 +41,10 @@ describe MigrateStagesStatuses, :migration do
end
def create_job(project:, pipeline:, stage:, status:, **opts)
+ stages = { test: 1, build: 2, deploy: 3}
+
jobs.create!(project_id: project, commit_id: pipeline,
- stage_idx: STAGES[stage.to_sym], stage: stage,
+ stage_idx: stages[stage.to_sym], stage: stage,
status: status, **opts)
end
end