diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-10-02 20:01:26 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-10-02 20:01:26 +0300 |
commit | 48c911b75e96563991387dc1c7b3aaa071d511cc (patch) | |
tree | 922137e8f162cf74b3965fc39ac1913b1049f0f5 /spec/factories/ci/job_artifacts.rb | |
parent | c0a982fad665e28769967b17eddd90900f62be78 (diff) |
CE Resolve "Refactor code quality similar to JUnit tests"
Diffstat (limited to 'spec/factories/ci/job_artifacts.rb')
-rw-r--r-- | spec/factories/ci/job_artifacts.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb index ee79f0ae5fd..e0aeadeecd7 100644 --- a/spec/factories/ci/job_artifacts.rb +++ b/spec/factories/ci/job_artifacts.rb @@ -117,6 +117,16 @@ FactoryBot.define do end end + trait :codequality do + file_type :codequality + file_format :gzip + + after(:build) do |artifact, evaluator| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/codequality/codequality.json.gz'), 'application/x-gzip') + end + end + trait :correct_checksum do after(:build) do |artifact, evaluator| artifact.file_sha256 = Digest::SHA256.file(artifact.file.path).hexdigest |