diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/requests/git_http_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/requests/git_http_spec.rb')
-rw-r--r-- | spec/requests/git_http_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index a3bfa7ea33c..dc735e3714d 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -433,7 +433,7 @@ RSpec.describe 'Git HTTP requests' do let(:path) { "#{redirect.path}.git" } it 'downloads get status 200 for redirects' do - clone_get(path, {}) + clone_get(path) expect(response).to have_gitlab_http_status(:ok) end @@ -465,7 +465,7 @@ RSpec.describe 'Git HTTP requests' do path: "/#{path}/info/refs?service=git-upload-pack" }) - clone_get(path, env) + clone_get(path, **env) expect(response).to have_gitlab_http_status(:forbidden) end @@ -493,7 +493,7 @@ RSpec.describe 'Git HTTP requests' do it "rejects pulls with 401 Unauthorized for unknown projects (no project existence information leak)" do user.block - download('doesnt/exist.git', env) do |response| + download('doesnt/exist.git', **env) do |response| expect(response).to have_gitlab_http_status(:unauthorized) end end @@ -693,7 +693,7 @@ RSpec.describe 'Git HTTP requests' do end it 'downloads get status 200' do - clone_get(path, env) + clone_get(path, **env) expect(response).to have_gitlab_http_status(:ok) end @@ -745,7 +745,7 @@ RSpec.describe 'Git HTTP requests' do # We know for sure it is not an information leak since pulls using # the build token must be allowed. it "rejects pushes with 403 Forbidden" do - push_get(path, env) + push_get(path, **env) expect(response).to have_gitlab_http_status(:forbidden) expect(response.body).to eq(git_access_error(:auth_upload)) @@ -754,7 +754,7 @@ RSpec.describe 'Git HTTP requests' do # We are "authenticated" as CI using a valid token here. But we are # not authorized to see any other project, so return "not found". it "rejects pulls for other project with 404 Not Found" do - clone_get("#{other_project.full_path}.git", env) + clone_get("#{other_project.full_path}.git", **env) expect(response).to have_gitlab_http_status(:not_found) expect(response.body).to eq(git_access_error(:project_not_found)) @@ -777,7 +777,7 @@ RSpec.describe 'Git HTTP requests' do let(:project) { create(:project) } it 'rejects pulls with 404 Not Found' do - clone_get path, env + clone_get(path, **env) expect(response).to have_gitlab_http_status(:not_found) expect(response.body).to eq(git_access_error(:no_repo)) @@ -785,7 +785,7 @@ RSpec.describe 'Git HTTP requests' do end it 'rejects pushes with 403 Forbidden' do - push_get path, env + push_get(path, **env) expect(response).to have_gitlab_http_status(:forbidden) expect(response.body).to eq(git_access_error(:auth_upload)) @@ -889,7 +889,7 @@ RSpec.describe 'Git HTTP requests' do end it "responds with status 200" do - clone_get(path, env) do |response| + clone_get(path, **env) do |response| expect(response).to have_gitlab_http_status(:ok) end end @@ -913,7 +913,7 @@ RSpec.describe 'Git HTTP requests' do end it 'blocks git access when the user did not accept terms', :aggregate_failures do - clone_get(path, env) do |response| + clone_get(path, **env) do |response| expect(response).to have_gitlab_http_status(:forbidden) end @@ -932,7 +932,7 @@ RSpec.describe 'Git HTTP requests' do end it 'allows clones' do - clone_get(path, env) do |response| + clone_get(path, **env) do |response| expect(response).to have_gitlab_http_status(:ok) end end |