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/models/concerns/ci/artifactable_spec.rb')
-rw-r--r--spec/models/concerns/ci/artifactable_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/models/concerns/ci/artifactable_spec.rb b/spec/models/concerns/ci/artifactable_spec.rb
index b27a4d0dcc1..6af244a5a0f 100644
--- a/spec/models/concerns/ci/artifactable_spec.rb
+++ b/spec/models/concerns/ci/artifactable_spec.rb
@@ -53,6 +53,15 @@ RSpec.describe Ci::Artifactable do
expect { |b| artifact.each_blob(&b) }.to raise_error(described_class::NotSupportedAdapterError)
end
end
+
+ context 'pushes artifact_size to application context' do
+ let(:artifact) { create(:ci_job_artifact, :junit) }
+
+ it 'logs artifact size', :aggregate_failures do
+ expect { |b| artifact.each_blob(&b) }.to yield_control.once
+ expect(Gitlab::ApplicationContext.current).to include("meta.artifact_size" => artifact.size)
+ end
+ end
end
context 'ActiveRecord scopes' do