Skip to content
Snippets Groups Projects
Commit 411cc779 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 3e36f70b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -108,7 +108,7 @@ describe 'Git HTTP requests' do
 
shared_examples_for 'project path without .git suffix' do
context "GET info/refs" do
let(:path) { "/#{project_path}/info/refs" }
let(:path) { "/#{repository_path}/info/refs" }
 
context "when no params are added" do
before do
Loading
Loading
@@ -116,7 +116,7 @@ describe 'Git HTTP requests' do
end
 
it "redirects to the .git suffix version" do
expect(response).to redirect_to("/#{project_path}.git/info/refs")
expect(response).to redirect_to("/#{repository_path}.git/info/refs")
end
end
 
Loading
Loading
@@ -128,7 +128,7 @@ describe 'Git HTTP requests' do
end
 
it "redirects to the .git suffix version" do
expect(response).to redirect_to("/#{project_path}.git/info/refs?service=#{params[:service]}")
expect(response).to redirect_to("/#{repository_path}.git/info/refs?service=#{params[:service]}")
end
end
 
Loading
Loading
@@ -140,7 +140,7 @@ describe 'Git HTTP requests' do
end
 
it "redirects to the .git suffix version" do
expect(response).to redirect_to("/#{project_path}.git/info/refs?service=#{params[:service]}")
expect(response).to redirect_to("/#{repository_path}.git/info/refs?service=#{params[:service]}")
end
end
 
Loading
Loading
@@ -159,13 +159,13 @@ describe 'Git HTTP requests' do
 
context "POST git-upload-pack" do
it "fails to find a route" do
expect { clone_post(project_path) }.to raise_error(ActionController::RoutingError)
expect { clone_post(repository_path) }.to raise_error(ActionController::RoutingError)
end
end
 
context "POST git-receive-pack" do
it "fails to find a route" do
expect { push_post(project_path) }.to raise_error(ActionController::RoutingError)
expect { push_post(repository_path) }.to raise_error(ActionController::RoutingError)
end
end
end
Loading
Loading
@@ -211,7 +211,7 @@ describe 'Git HTTP requests' do
end
 
it_behaves_like 'project path without .git suffix' do
let(:project_path) { "#{user.namespace.path}/project.git-project" }
let(:repository_path) { "#{user.namespace.path}/project.git-project" }
end
end
end
Loading
Loading
@@ -820,7 +820,7 @@ describe 'Git HTTP requests' do
end
 
it_behaves_like 'project path without .git suffix' do
let(:project_path) { create(:project, :repository, :public, path: 'project.git-project').full_path }
let(:repository_path) { create(:project, :repository, :public, path: 'project.git-project').full_path }
end
 
context "retrieving an info/refs file" do
Loading
Loading
Loading
Loading
@@ -3,6 +3,7 @@
RSpec.shared_examples 'log import failure' do |importable_column|
it 'tracks error' do
extra = {
source: action,
relation_key: relation_key,
relation_index: relation_index,
retry_count: retry_count
Loading
Loading
@@ -11,7 +12,12 @@ RSpec.shared_examples 'log import failure' do |importable_column|
 
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(exception, extra)
 
subject.log_import_failure(relation_key, relation_index, exception, retry_count)
subject.log_import_failure(
source: action,
relation_key: relation_key,
relation_index: relation_index,
exception: exception,
retry_count: retry_count)
end
 
it 'saves data to ImportFailure' do
Loading
Loading
@@ -21,6 +27,7 @@ RSpec.shared_examples 'log import failure' do |importable_column|
 
aggregate_failures do
expect(import_failure[importable_column]).to eq(importable.id)
expect(import_failure.source).to eq(action)
expect(import_failure.relation_key).to eq(relation_key)
expect(import_failure.relation_index).to eq(relation_index)
expect(import_failure.exception_class).to eq('StandardError')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment