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.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb
index 5e049e0375b..1c418f646f6 100644
--- a/spec/factories/ci/job_artifacts.rb
+++ b/spec/factories/ci/job_artifacts.rb
@@ -478,5 +478,15 @@ FactoryBot.define do
artifact.file_sha256 = Digest::SHA256.file(artifact.file.path).hexdigest
end
end
+
+ trait :annotations do
+ file_type { :annotations }
+ file_format { :gzip }
+
+ after(:build) do |artifact, evaluator|
+ artifact.file = fixture_file_upload(
+ Rails.root.join('spec/fixtures/gl-annotations.json.gz'), 'application/x-gzip')
+ end
+ end
end
end