diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-28 09:36:57 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-28 12:09:20 +0200 |
commit | f369da063f4a07b6c30852a29e5ce1071e77b86a (patch) | |
tree | 8d9448899f92070bb7a8bbddf1225f6841341ad7 /spec/lib/gitlab/git | |
parent | 941756c59f2c193e06af9060943187eff8e84dfa (diff) | |
download | gitlab-ce-f369da063f4a07b6c30852a29e5ce1071e77b86a.tar.gz |
Commits between in Gitaly only
Prior to this change, most the commits counted were done through Gitaly.
This removes the last point where this wasn't the case.
This makes the `rugged_count_commits` method obsolete, with its tests.
Closes https://gitlab.com/gitlab-org/gitaly/issues/315
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index b78fe4ba310..6ec4b90d70c 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -996,46 +996,6 @@ describe Gitlab::Git::Repository, seed_helper: true do end end - describe "#rugged_commits_between" do - around do |example| - # TODO #rugged_commits_between will be removed, has been migrated to gitaly - Gitlab::GitalyClient::StorageSettings.allow_disk_access do - example.run - end - end - - context 'two SHAs' do - let(:first_sha) { 'b0e52af38d7ea43cf41d8a6f2471351ac036d6c9' } - let(:second_sha) { '0e50ec4d3c7ce42ab74dda1d422cb2cbffe1e326' } - - it 'returns the number of commits between' do - expect(repository.rugged_commits_between(first_sha, second_sha).count).to eq(3) - end - end - - context 'SHA and master branch' do - let(:sha) { 'b0e52af38d7ea43cf41d8a6f2471351ac036d6c9' } - let(:branch) { 'master' } - - it 'returns the number of commits between a sha and a branch' do - expect(repository.rugged_commits_between(sha, branch).count).to eq(5) - end - - it 'returns the number of commits between a branch and a sha' do - expect(repository.rugged_commits_between(branch, sha).count).to eq(0) # sha is before branch - end - end - - context 'two branches' do - let(:first_branch) { 'feature' } - let(:second_branch) { 'master' } - - it 'returns the number of commits between' do - expect(repository.rugged_commits_between(first_branch, second_branch).count).to eq(17) - end - end - end - describe '#count_commits_between' do subject { repository.count_commits_between('feature', 'master') } |