Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-05-11 14:49:52 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-05-11 14:57:43 +0300
commitcc7931cc9c38a54eb7d5b721113f8bf89781e447 (patch)
tree27d8f40297f07866d0656c9714e5916801c5baee /spec/lib/gitlab/repo_path_spec.rb
parentf1a2ada1c07a66d7bd0475748527b36e8c26bf62 (diff)
Remove Gitlab::RepoPath.strip_storage_path
This used to be executed because of the post receive worker, but this uses Gitlab::GlRepository.parse now. So this removes dead code and reduces the number of calls on `#legacy_storage_path`.
Diffstat (limited to 'spec/lib/gitlab/repo_path_spec.rb')
-rw-r--r--spec/lib/gitlab/repo_path_spec.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/spec/lib/gitlab/repo_path_spec.rb b/spec/lib/gitlab/repo_path_spec.rb
index f030f371372..13940713dfc 100644
--- a/spec/lib/gitlab/repo_path_spec.rb
+++ b/spec/lib/gitlab/repo_path_spec.rb
@@ -45,25 +45,6 @@ describe ::Gitlab::RepoPath do
end
end
- describe '.strip_storage_path' do
- before do
- allow(Gitlab.config.repositories).to receive(:storages).and_return({
- 'storage1' => Gitlab::GitalyClient::StorageSettings.new('path' => '/foo'),
- 'storage2' => Gitlab::GitalyClient::StorageSettings.new('path' => '/bar')
- })
- end
-
- it 'strips the storage path' do
- expect(described_class.strip_storage_path('/bar/foo/qux/baz.git')).to eq('foo/qux/baz.git')
- end
-
- it 'raises NotFoundError if no storage matches the path' do
- expect { described_class.strip_storage_path('/doesnotexist/foo.git') }.to raise_error(
- described_class::NotFoundError
- )
- end
- end
-
describe '.find_project' do
let(:project) { create(:project) }
let(:redirect) { project.route.create_redirect('foo/bar/baz') }