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:
Diffstat (limited to 'spec/services/ci/update_ci_ref_status_service_spec.rb')
-rw-r--r--spec/services/ci/update_ci_ref_status_service_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/ci/update_ci_ref_status_service_spec.rb b/spec/services/ci/update_ci_ref_status_service_spec.rb
index 2b069452a55..8b60586318d 100644
--- a/spec/services/ci/update_ci_ref_status_service_spec.rb
+++ b/spec/services/ci/update_ci_ref_status_service_spec.rb
@@ -119,6 +119,14 @@ describe Ci::UpdateCiRefStatusService do
it_behaves_like 'does a noop'
end
+ context 'pipeline is retried' do
+ before do
+ ci_ref.update!(last_updated_by_pipeline: pipeline)
+ end
+
+ it_behaves_like 'updates ci_ref'
+ end
+
context 'ref is stale' do
let(:pipeline1) { create(:ci_pipeline, :success, project: ci_ref.project, ref: ci_ref.ref, tag: ci_ref.tag) }
let(:pipeline2) { create(:ci_pipeline, :success, project: ci_ref.project, ref: ci_ref.ref, tag: ci_ref.tag) }