diff options
Diffstat (limited to 'spec/services/ci/job_artifacts/create_service_spec.rb')
-rw-r--r-- | spec/services/ci/job_artifacts/create_service_spec.rb | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/spec/services/ci/job_artifacts/create_service_spec.rb b/spec/services/ci/job_artifacts/create_service_spec.rb index 01f240805f5..b7a810ce47e 100644 --- a/spec/services/ci/job_artifacts/create_service_spec.rb +++ b/spec/services/ci/job_artifacts/create_service_spec.rb @@ -30,14 +30,6 @@ RSpec.describe Ci::JobArtifacts::CreateService do UploadedFile.new(upload.path, **params) end - def unique_metrics_report_uploaders - Gitlab::UsageDataCounters::HLLRedisCounter.unique_events( - event_names: described_class::METRICS_REPORT_UPLOAD_EVENT_NAME, - start_date: 2.weeks.ago, - end_date: 2.weeks.from_now - ) - end - describe '#execute' do subject { service.execute(artifacts_file, params, metadata_file: metadata_file) } @@ -61,12 +53,6 @@ RSpec.describe Ci::JobArtifacts::CreateService do expect(new_artifact.locked).to eq(job.pipeline.locked) end - it 'does not track the job user_id' do - subject - - expect(unique_metrics_report_uploaders).to eq(0) - end - context 'when metadata file is also uploaded' do let(:metadata_file) do file_to_upload('spec/fixtures/ci_build_artifacts_metadata.gz', sha256: artifacts_sha256) @@ -188,20 +174,6 @@ RSpec.describe Ci::JobArtifacts::CreateService do end end - context 'when artifact_type is metrics' do - before do - allow(job).to receive(:user_id).and_return(123) - end - - let(:params) { { 'artifact_type' => 'metrics', 'artifact_format' => 'gzip' }.with_indifferent_access } - - it 'tracks the job user_id' do - subject - - expect(unique_metrics_report_uploaders).to eq(1) - end - end - shared_examples 'rescues object storage error' do |klass, message, expected_message| it "handles #{klass}" do allow_next_instance_of(JobArtifactUploader) do |uploader| |