提交 b8ce910f 编写于 作者: S Shinya Maeda

Set sha256 checksum when archiving traces

上级 2a97550d
......@@ -137,7 +137,8 @@ module Gitlab
job.create_job_artifacts_trace!(
project: job.project,
file_type: :trace,
file: stream)
file: stream,
file_sha256: Digest::SHA256.file(path).hexdigest)
end
end
......
......@@ -414,6 +414,7 @@ describe Gitlab::Ci::Trace do
expect(File.exist?(src_path)).to be_falsy
expect(src_checksum)
.to eq(Digest::SHA256.file(build.job_artifacts_trace.file.path).digest)
expect(build.job_artifacts_trace.file_sha256).to eq(src_checksum)
end
end
......@@ -439,6 +440,7 @@ describe Gitlab::Ci::Trace do
expect(build.old_trace).to be_nil
expect(src_checksum)
.to eq(Digest::SHA256.file(build.job_artifacts_trace.file.path).digest)
expect(build.job_artifacts_trace.file_sha256).to eq(src_checksum)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册