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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 22:00:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 22:00:14 +0300
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/lib/gitlab/ci/status
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/status')
-rw-r--r--spec/lib/gitlab/ci/status/bridge/factory_spec.rb8
-rw-r--r--spec/lib/gitlab/ci/status/build/manual_spec.rb41
2 files changed, 42 insertions, 7 deletions
diff --git a/spec/lib/gitlab/ci/status/bridge/factory_spec.rb b/spec/lib/gitlab/ci/status/bridge/factory_spec.rb
index 6081f104e42..c13901a4776 100644
--- a/spec/lib/gitlab/ci/status/bridge/factory_spec.rb
+++ b/spec/lib/gitlab/ci/status/bridge/factory_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Status::Bridge::Factory do
+RSpec.describe Gitlab::Ci::Status::Bridge::Factory, feature_category: :continuous_integration do
let(:user) { create(:user) }
let(:project) { bridge.project }
let(:status) { factory.fabricate! }
@@ -59,13 +59,15 @@ RSpec.describe Gitlab::Ci::Status::Bridge::Factory do
context 'failed with downstream_pipeline_creation_failed' do
before do
- bridge.options = { downstream_errors: ['No stages / jobs for this pipeline.', 'other error'] }
+ bridge.options = { downstream_errors: ['Pipeline will not run for the selected trigger. ' \
+ 'The rules configuration prevented any jobs from being added to the pipeline.', 'other error'] }
bridge.failure_reason = 'downstream_pipeline_creation_failed'
end
it 'fabricates correct status_tooltip' do
expect(status.status_tooltip).to eq(
- "#{s_('CiStatusText|failed')} - (downstream pipeline can not be created, No stages / jobs for this pipeline., other error)"
+ "#{s_('CiStatusText|failed')} - (downstream pipeline can not be created, Pipeline will not run for the selected trigger. " \
+ "The rules configuration prevented any jobs from being added to the pipeline., other error)"
)
end
end
diff --git a/spec/lib/gitlab/ci/status/build/manual_spec.rb b/spec/lib/gitlab/ci/status/build/manual_spec.rb
index a1152cb77e3..8f5d1558314 100644
--- a/spec/lib/gitlab/ci/status/build/manual_spec.rb
+++ b/spec/lib/gitlab/ci/status/build/manual_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Status::Build::Manual do
+RSpec.describe Gitlab::Ci::Status::Build::Manual, feature_category: :continuous_integration do
let_it_be(:user) { create(:user) }
let_it_be(:job) { create(:ci_build, :manual) }
@@ -18,11 +18,44 @@ RSpec.describe Gitlab::Ci::Status::Build::Manual do
job.project.add_maintainer(user)
end
- it { expect(subject.illustration[:content]).to match /This job requires manual intervention to start/ }
+ context 'when the job has not been played' do
+ it 'instructs the user about possible actions' do
+ expect(subject.illustration[:content]).to eq(
+ _(
+ 'This job does not start automatically and must be started manually. ' \
+ 'You can add CI/CD variables below for last-minute configuration changes before starting the job.'
+ )
+ )
+ end
+ end
+
+ context 'when the job is retryable' do
+ before do
+ job.update!(status: :failed)
+ end
+
+ it 'instructs the user about possible actions' do
+ expect(subject.illustration[:content]).to eq(
+ _("You can modify this job's CI/CD variables before running it again.")
+ )
+ end
+ end
+ end
+
+ context 'when the user can not trigger the job because of outdated deployment' do
+ before do
+ allow(job).to receive(:outdated_deployment?).and_return(true)
+ end
+
+ it { expect(subject.illustration[:content]).to match /This deployment job does not run automatically and must be started manually, but it's older than the latest deployment, and therefore can't run/ }
end
- context 'when the user can not trigger the job' do
- it { expect(subject.illustration[:content]).to match /This job does not run automatically and must be started manually/ }
+ context 'when the user can not trigger the job due to another reason' do
+ it 'informs the user' do
+ expect(subject.illustration[:content]).to eq(
+ _("This job does not run automatically and must be started manually, but you do not have access to it.")
+ )
+ end
end
end