summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-03-06 17:16:33 +0900
committerShinya Maeda <shinya@gitlab.com>2018-03-06 17:16:33 +0900
commit03438886e1de94df6bd89471e67aa6347fd5fb2e (patch)
tree320f64b999c9a97cdcfca33e5a9dd4a88195738d /spec/requests
parenta1c612ce2dc2b42137664f73c3a70f3a283bcc0a (diff)
downloadgitlab-ce-03438886e1de94df6bd89471e67aa6347fd5fb2e.tar.gz
Change column to file_sha256. Add test. Add changelog
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/runner_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 72cafac3f90..ce1311ac97c 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -1100,11 +1100,13 @@ describe API::Runner do
context 'posts artifacts file and metadata file' do
let!(:artifacts) { file_upload }
+ let!(:artifacts_sha256) { Digest::SHA256.file(artifacts.path).hexdigest }
let!(:metadata) { file_upload2 }
let(:stored_artifacts_file) { job.reload.artifacts_file.file }
let(:stored_metadata_file) { job.reload.artifacts_metadata.file }
let(:stored_artifacts_size) { job.reload.artifacts_size }
+ let(:stored_artifacts_sha256) { job.reload.job_artifacts_archive.file_sha256 }
before do
post(api("/jobs/#{job.id}/artifacts"), post_data, headers_with_token)
@@ -1114,6 +1116,7 @@ describe API::Runner do
let(:post_data) do
{ 'file.path' => artifacts.path,
'file.name' => artifacts.original_filename,
+ 'file.sha256' => artifacts_sha256,
'metadata.path' => metadata.path,
'metadata.name' => metadata.original_filename }
end
@@ -1123,6 +1126,7 @@ describe API::Runner do
expect(stored_artifacts_file.original_filename).to eq(artifacts.original_filename)
expect(stored_metadata_file.original_filename).to eq(metadata.original_filename)
expect(stored_artifacts_size).to eq(72821)
+ expect(stored_artifacts_sha256).to eq(artifacts_sha256)
end
end