summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/bare_repository_import/repository_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/bare_repository_import/repository_spec.rb')
-rw-r--r--spec/lib/gitlab/bare_repository_import/repository_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/lib/gitlab/bare_repository_import/repository_spec.rb b/spec/lib/gitlab/bare_repository_import/repository_spec.rb
index 0607e2232a1..d2ecb1869fc 100644
--- a/spec/lib/gitlab/bare_repository_import/repository_spec.rb
+++ b/spec/lib/gitlab/bare_repository_import/repository_spec.rb
@@ -54,16 +54,15 @@ describe ::Gitlab::BareRepositoryImport::Repository do
end
context 'hashed storage' do
- let(:gitlab_shell) { Gitlab::Shell.new }
- let(:repository_storage) { 'default' }
- let(:root_path) { Gitlab.config.repositories.storages[repository_storage].legacy_disk_path }
let(:hash) { '6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b' }
let(:hashed_path) { "@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b" }
+ let(:root_path) { TestEnv.repos_path }
let(:repo_path) { File.join(root_path, "#{hashed_path}.git") }
let(:wiki_path) { File.join(root_path, "#{hashed_path}.wiki.git") }
before do
- gitlab_shell.create_repository(repository_storage, hashed_path, 'group/project')
+ TestEnv.create_bare_repository(repo_path)
+
Gitlab::GitalyClient::StorageSettings.allow_disk_access do
repository = Rugged::Repository.new(repo_path)
repository.config['gitlab.fullpath'] = 'to/repo'
@@ -71,7 +70,7 @@ describe ::Gitlab::BareRepositoryImport::Repository do
end
after do
- gitlab_shell.remove_repository(repository_storage, hashed_path)
+ FileUtils.rm_rf(repo_path)
end
subject { described_class.new(root_path, repo_path) }