diff options
-rw-r--r-- | app/models/concerns/has_status.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/background_migration/migrate_stage_status.rb | 2 | ||||
-rw-r--r-- | spec/migrations/migrate_stages_statuses_spec.rb | 5 | ||||
-rw-r--r-- | spec/models/commit_status_spec.rb | 1 |
4 files changed, 4 insertions, 6 deletions
diff --git a/app/models/concerns/has_status.rb b/app/models/concerns/has_status.rb index 8ea5a007f76..a94226bb735 100644 --- a/app/models/concerns/has_status.rb +++ b/app/models/concerns/has_status.rb @@ -9,7 +9,7 @@ module HasStatus COMPLETED_STATUSES = %w[success failed canceled skipped].freeze ORDERED_STATUSES = %w[failed pending running manual canceled success skipped created].freeze STATUSES_ENUM = { created: 0, pending: 1, running: 2, success: 3, - failed: 4, canceled: 5, skipped: 6, manual: 7 } + failed: 4, canceled: 5, skipped: 6, manual: 7 }.freeze class_methods do def enumerated_status! diff --git a/lib/gitlab/background_migration/migrate_stage_status.rb b/lib/gitlab/background_migration/migrate_stage_status.rb index 3c9744d1607..b1ff0900709 100644 --- a/lib/gitlab/background_migration/migrate_stage_status.rb +++ b/lib/gitlab/background_migration/migrate_stage_status.rb @@ -2,7 +2,7 @@ module Gitlab module BackgroundMigration class MigrateStageStatus STATUSES = { created: 0, pending: 1, running: 2, success: 3, - failed: 4, canceled: 5, skipped: 6, manual: 7 } + failed: 4, canceled: 5, skipped: 6, manual: 7 }.freeze class Build < ActiveRecord::Base self.table_name = 'ci_builds' diff --git a/spec/migrations/migrate_stages_statuses_spec.rb b/spec/migrations/migrate_stages_statuses_spec.rb index 1769b1e256b..7a424bdaedb 100644 --- a/spec/migrations/migrate_stages_statuses_spec.rb +++ b/spec/migrations/migrate_stages_statuses_spec.rb @@ -8,7 +8,7 @@ describe MigrateStagesStatuses, :migration do let(:projects) { table(:projects) } STATUSES = { created: 0, pending: 1, running: 2, success: 3, - failed: 4, canceled: 5, skipped: 6, manual: 7 } + failed: 4, canceled: 5, skipped: 6, manual: 7 }.freeze before do stub_const("#{described_class.name}::BATCH_SIZE", 2) @@ -59,9 +59,8 @@ describe MigrateStagesStatuses, :migration do end end - def create_job(project:, pipeline:, stage:, status:, **opts) - stages = { test: 1, build: 2, deploy: 3} + stages = { test: 1, build: 2, deploy: 3 } jobs.create!(project_id: project, commit_id: pipeline, stage_idx: stages[stage.to_sym], stage: stage, diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index c0cbf0b2f95..c7651ce9b46 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -419,7 +419,6 @@ describe CommitStatus, :models do end end - describe '#locking_enabled?' do before do commit_status.lock_version = 100 |