diff options
author | Micaël Bergeron <mbergeron@gitlab.com> | 2018-03-22 16:06:10 +0300 |
---|---|---|
committer | Micaël Bergeron <mbergeron@gitlab.com> | 2018-03-22 16:06:10 +0300 |
commit | 9c6663ea079128bb730ec2a168b43961cd9462ec (patch) | |
tree | 4f62c2e745c7f3e8571ee8c023abcce316c68275 /spec/factories/ci | |
parent | 6801a93e5e7447199b091e44f33c96d22a1a1960 (diff) | |
parent | c01697539c3da4e72b1812662ff35d1f709d1dcc (diff) |
Merge remote-tracking branch 'origin/master' into 40781-os-to-ce
Diffstat (limited to 'spec/factories/ci')
-rw-r--r-- | spec/factories/ci/job_artifacts.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb index 7ada3b904d3..3d3287d8168 100644 --- a/spec/factories/ci/job_artifacts.rb +++ b/spec/factories/ci/job_artifacts.rb @@ -39,5 +39,11 @@ FactoryBot.define do Rails.root.join('spec/fixtures/trace/sample_trace'), 'text/plain') end end + + trait :correct_checksum do + after(:build) do |artifact, evaluator| + artifact.file_sha256 = Digest::SHA256.file(artifact.file.path).hexdigest + end + end end end |