diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-10-02 18:10:58 +0900 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:08:14 +0200 |
commit | 4dd70b9e1e67b50d846b4fb48c0ff942104119a5 (patch) | |
tree | 18e4381d74eb22d781d0c51d84be54c7e1c48b4e | |
parent | f1226cd5a9240c03438ef5f24a57bce4ad3ec554 (diff) | |
download | gitlab-ce-4dd70b9e1e67b50d846b4fb48c0ff942104119a5.tar.gz |
Fix spec
-rw-r--r-- | spec/lib/gitlab/ci/status/build/factory_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/pipeline/blocked_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/pipeline/factory_spec.rb | 7 | ||||
-rw-r--r-- | spec/lib/gitlab/import_export/all_models.yml | 1 | ||||
-rw-r--r-- | spec/workers/stuck_ci_jobs_worker_spec.rb | 2 |
5 files changed, 12 insertions, 6 deletions
diff --git a/spec/lib/gitlab/ci/status/build/factory_spec.rb b/spec/lib/gitlab/ci/status/build/factory_spec.rb index 1073c4b7ccd..aa53ecd5967 100644 --- a/spec/lib/gitlab/ci/status/build/factory_spec.rb +++ b/spec/lib/gitlab/ci/status/build/factory_spec.rb @@ -330,7 +330,7 @@ describe Gitlab::Ci::Status::Build::Factory do it 'matches correct extended statuses' do expect(factory.extended_statuses) .to eq [Gitlab::Ci::Status::Build::Scheduled, - Gitlab::Ci::Status::Build::Play, + Gitlab::Ci::Status::Build::Unschedule, Gitlab::Ci::Status::Build::Action] end @@ -344,9 +344,9 @@ describe Gitlab::Ci::Status::Build::Factory do expect(status.icon).to eq 'status_scheduled' expect(status.favicon).to eq 'favicon_status_scheduled' expect(status.illustration).to include(:image, :size, :title, :content) - expect(status.label).to include 'manual play action' + expect(status.label).to include 'unschedule action' expect(status).to have_details - expect(status.action_path).to include 'play' + expect(status.action_path).to include 'unschedule' end context 'when user has ability to play action' do diff --git a/spec/lib/gitlab/ci/status/pipeline/blocked_spec.rb b/spec/lib/gitlab/ci/status/pipeline/blocked_spec.rb index 49a25b4a389..1a2b952d374 100644 --- a/spec/lib/gitlab/ci/status/pipeline/blocked_spec.rb +++ b/spec/lib/gitlab/ci/status/pipeline/blocked_spec.rb @@ -15,7 +15,7 @@ describe Gitlab::Ci::Status::Pipeline::Blocked do describe '#label' do it 'overrides status label' do - expect(subject.label).to eq 'waiting for manual action or delayed job' + expect(subject.label).to eq 'waiting for manual action' end end diff --git a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb index d83f260927f..694d4ce160a 100644 --- a/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb +++ b/spec/lib/gitlab/ci/status/pipeline/factory_spec.rb @@ -23,11 +23,16 @@ describe Gitlab::Ci::Status::Pipeline::Factory do expect(factory.core_status).to be_a expected_status end - if HasStatus::BLOCKED_STATUS.include?(simple_status) + if simple_status == 'manual' it 'matches a correct extended statuses' do expect(factory.extended_statuses) .to eq [Gitlab::Ci::Status::Pipeline::Blocked] end + elsif simple_status == 'scheduled' + it 'matches a correct extended statuses' do + expect(factory.extended_statuses) + .to eq [Gitlab::Ci::Status::Pipeline::Scheduled] + end else it 'does not match extended statuses' do expect(factory.extended_statuses).to be_empty diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index ec2bdbe22e1..fe167033941 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -117,6 +117,7 @@ pipelines: - retryable_builds - cancelable_statuses - manual_actions +- scheduled_actions - artifacts - pipeline_schedule - merge_requests diff --git a/spec/workers/stuck_ci_jobs_worker_spec.rb b/spec/workers/stuck_ci_jobs_worker_spec.rb index 2f8ba4859d7..f38bc11f7f0 100644 --- a/spec/workers/stuck_ci_jobs_worker_spec.rb +++ b/spec/workers/stuck_ci_jobs_worker_spec.rb @@ -143,7 +143,7 @@ describe StuckCiJobsWorker do expect(Ci::Build.scheduled.count).to eq(0) expect(job).to be_failed - expect(job).to be_schedule_expired + expect(job).to be_stale_schedule end end |