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>2022-09-13 18:12:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-13 18:12:17 +0300
commit4597f7fe473d9fa622510f8967620006d4bda64e (patch)
treedafe547a51e57112ad92258f4bf992c014591a88 /spec/services/ci/job_artifacts
parent37a739daec0d7021b2af6ad03c60d37ac3461d88 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/job_artifacts')
-rw-r--r--spec/services/ci/job_artifacts/create_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/ci/job_artifacts/create_service_spec.rb b/spec/services/ci/job_artifacts/create_service_spec.rb
index 6809b694b22..a2259f9813b 100644
--- a/spec/services/ci/job_artifacts/create_service_spec.rb
+++ b/spec/services/ci/job_artifacts/create_service_spec.rb
@@ -181,6 +181,18 @@ RSpec.describe Ci::JobArtifacts::CreateService do
end
end
+ context 'with job partitioning' do
+ let(:job) { create(:ci_build, project: project, partition_id: 123) }
+
+ it 'sets partition_id on artifacts' do
+ expect { subject }.to change { Ci::JobArtifact.count }
+
+ artifacts_partitions = job.job_artifacts.map(&:partition_id).uniq
+
+ expect(artifacts_partitions).to eq([123])
+ end
+ end
+
shared_examples 'rescues object storage error' do |klass, message, expected_message|
it "handles #{klass}" do
allow_next_instance_of(JobArtifactUploader) do |uploader|