diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-07-11 19:18:37 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-07-11 19:18:37 +0300 |
commit | 284ed39e3038392e5ca299a8ce58541a4abead99 (patch) | |
tree | 254dad49b60494154b1aa23b00edf7d005cb1eab /features | |
parent | 36c60b4c269a3d60f6b3e0df3bf1bfc7d44a6b54 (diff) | |
parent | 1bfc2ed633b2086b547727acc4aa0abaaea7731f (diff) |
Merge branch 'send-entry-via-Gitlab-Workhorse-Send-Data' into 'master'
Use Gitlab-Workhorse-Send-Data to send entry
## What does this MR do?
Use Gitlab-Workhorse-Send-Data to send entry:
Closes #19224, Closes #19128
Also requires this MR to work:
https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/53
## Are there points in the code the reviewer needs to double check?
Do we have a test for this?
## Why was this MR needed?
This way gitlab-workhorse does not have to call any API.
See merge request !5094
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/builds/artifacts.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb index 2876e8812e9..b4a32ed2e38 100644 --- a/features/steps/project/builds/artifacts.rb +++ b/features/steps/project/builds/artifacts.rb @@ -68,10 +68,16 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps end step 'download of a file extracted from build artifacts should start' do - # this will be accelerated by Workhorse - response_json = JSON.parse(page.body, symbolize_names: true) - expect(response_json[:archive]).to end_with('build_artifacts.zip') - expect(response_json[:entry]).to eq Base64.encode64('ci_artifacts.txt') + send_data = response_headers[Gitlab::Workhorse::SEND_DATA_HEADER] + + expect(send_data).to start_with('artifacts-entry:') + + base64_params = send_data.sub(/\Aartifacts\-entry:/, '') + params = JSON.parse(Base64.urlsafe_decode64(base64_params)) + + expect(params.keys).to eq(['Archive', 'Entry']) + expect(params['Archive']).to end_with('build_artifacts.zip') + expect(params['Entry']).to eq(Base64.encode64('ci_artifacts.txt')) end step 'I click a first row within build artifacts table' do |