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/factories/ci/job_artifacts.rb')
-rw-r--r--spec/factories/ci/job_artifacts.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb
index 2f4eb99a073..223de873a04 100644
--- a/spec/factories/ci/job_artifacts.rb
+++ b/spec/factories/ci/job_artifacts.rb
@@ -87,6 +87,17 @@ FactoryBot.define do
end
end
+ trait :unarchived_trace_artifact do
+ file_type { :trace }
+ file_format { :raw }
+
+ after(:build) do |artifact, evaluator|
+ file = double('file', path: '/path/to/job.log')
+ artifact.file = file
+ allow(artifact.file).to receive(:file).and_return(CarrierWave::SanitizedFile.new(file))
+ end
+ end
+
trait :junit do
file_type { :junit }
file_format { :gzip }