diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-23 23:26:21 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-02-24 00:08:22 +0300 |
commit | ded12e0ca53a75518d04114c074748594aabda1a (patch) | |
tree | fe4a35072a19cccc4ae845cc1d6014f4d4f1346a /spec/requests/git_http_spec.rb | |
parent | 296a4e6825a3528917bb385123cdf62ae3d1944e (diff) |
Return a 404 instead of 403 if the repository does not exist on disksh-return-404-if-repo-does-not-exist
As mentioned in https://gitlab.com/gitlab-com/migration/issues/216, this was
leading to confusion in the Geo logs. Having the right return code also helps
with error monitoring.
Diffstat (limited to 'spec/requests/git_http_spec.rb')
-rw-r--r-- | spec/requests/git_http_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb index c6fdda203ad..1b0a5eac9b0 100644 --- a/spec/requests/git_http_spec.rb +++ b/spec/requests/git_http_spec.rb @@ -597,7 +597,7 @@ describe 'Git HTTP requests' do context "when a gitlab ci token is provided" do let(:project) { create(:project, :repository) } let(:build) { create(:ci_build, :running) } - let(:other_project) { create(:project) } + let(:other_project) { create(:project, :repository) } before do build.update!(project: project) # can't associate it on factory create @@ -648,10 +648,10 @@ describe 'Git HTTP requests' do context 'when the repo does not exist' do let(:project) { create(:project) } - it 'rejects pulls with 403 Forbidden' do + it 'rejects pulls with 404 Not Found' do clone_get path, env - expect(response).to have_gitlab_http_status(:forbidden) + expect(response).to have_gitlab_http_status(:not_found) expect(response.body).to eq(git_access_error(:no_repo)) end end |