diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-10-02 06:21:46 +0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2018-10-02 22:34:28 +0300 |
commit | a99bf447a24957cf11b89d4f04a2b84613367ef2 (patch) | |
tree | 68821625f3e39e81f495d89537b55334180b0f77 /spec/lib/gitlab/git/branch_spec.rb | |
parent | 0ef1060e14b8ac09159e466fe5f4ca3195e080c2 (diff) |
Remove Gitlab::Git::Repository#rugged and Gollum code
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
Diffstat (limited to 'spec/lib/gitlab/git/branch_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/branch_spec.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/spec/lib/gitlab/git/branch_spec.rb b/spec/lib/gitlab/git/branch_spec.rb index 79ccbb79966..0df282d0ae3 100644 --- a/spec/lib/gitlab/git/branch_spec.rb +++ b/spec/lib/gitlab/git/branch_spec.rb @@ -3,9 +3,7 @@ require "spec_helper" describe Gitlab::Git::Branch, :seed_helper do let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '') } let(:rugged) do - Gitlab::GitalyClient::StorageSettings.allow_disk_access do - repository.rugged - end + Rugged::Repository.new(File.join(TestEnv.repos_path, repository.relative_path)) end subject { repository.branches } @@ -74,9 +72,7 @@ describe Gitlab::Git::Branch, :seed_helper do Gitlab::Git.committer_hash(email: user.email, name: user.name) end let(:params) do - parents = Gitlab::GitalyClient::StorageSettings.allow_disk_access do - [repository.rugged.head.target] - end + parents = [rugged.head.target] tree = parents.first.tree { |