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:
authorFilipa Lacerda <filipa@gitlab.com>2018-01-08 22:19:52 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-01-08 22:19:52 +0300
commite2b759a2f483663e0771180de6b97bb9344a56cd (patch)
tree32cd72a70e405dc0858d774ca3354d6aef1bf445 /spec/lib/gitlab/git/repository_spec.rb
parent7ca5a3f99dd3a3c1800f65da7b4f08395a97395a (diff)
parentdf74461014bbdbc691f4f4039b02962dad292362 (diff)
Merge branch 'master' into 34312-eslint-vue-plugin
* master: (140 commits) Add Gitter room link to I want to contribute since you always have questions Use workhorse 3.4.0 chore: remove symbolic link Add memoization for properties Resolve "Allow QA tests to run with `CHROME_HEADLESS=false`" Resolve "Add graph value to hover" Fix slash commands dropdown description disables the shortcut to the issue boards when issues are disabled Fix static analysys Disable STI of ActiveRecord. Refactoring specs. Fix StaticSnalysys Fix change log Add changelog Revert bulk_insert and bring back AR insert(one by one) Add a new test for emptified params Use batch update for Service deactivation Fix query to look for proper unmanaged kubernetes service Fix static anylysy Use bulk_insert instead of AR create Opitmize migration process by using both unmanaged_kubernetes_service and kubernetes_service_without_template ...
Diffstat (limited to 'spec/lib/gitlab/git/repository_spec.rb')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb42
1 files changed, 26 insertions, 16 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index f94234f6010..f346a345f00 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -649,29 +649,39 @@ describe Gitlab::Git::Repository, seed_helper: true do
Gitlab::Shell.new.remove_repository(storage_path, 'my_project')
end
- it 'fetches a repository as a mirror remote' do
- subject
+ shared_examples 'repository mirror fecthing' do
+ it 'fetches a repository as a mirror remote' do
+ subject
- expect(refs(new_repository.path)).to eq(refs(repository.path))
- end
+ expect(refs(new_repository.path)).to eq(refs(repository.path))
+ end
- context 'with keep-around refs' do
- let(:sha) { SeedRepo::Commit::ID }
- let(:keep_around_ref) { "refs/keep-around/#{sha}" }
- let(:tmp_ref) { "refs/tmp/#{SecureRandom.hex}" }
+ context 'with keep-around refs' do
+ let(:sha) { SeedRepo::Commit::ID }
+ let(:keep_around_ref) { "refs/keep-around/#{sha}" }
+ let(:tmp_ref) { "refs/tmp/#{SecureRandom.hex}" }
- before do
- repository.rugged.references.create(keep_around_ref, sha, force: true)
- repository.rugged.references.create(tmp_ref, sha, force: true)
- end
+ before do
+ repository.rugged.references.create(keep_around_ref, sha, force: true)
+ repository.rugged.references.create(tmp_ref, sha, force: true)
+ end
- it 'includes the temporary and keep-around refs' do
- subject
+ it 'includes the temporary and keep-around refs' do
+ subject
- expect(refs(new_repository.path)).to include(keep_around_ref)
- expect(refs(new_repository.path)).to include(tmp_ref)
+ expect(refs(new_repository.path)).to include(keep_around_ref)
+ expect(refs(new_repository.path)).to include(tmp_ref)
+ end
end
end
+
+ context 'with gitaly enabled' do
+ it_behaves_like 'repository mirror fecthing'
+ end
+
+ context 'with gitaly enabled', :skip_gitaly_mock do
+ it_behaves_like 'repository mirror fecthing'
+ end
end
describe '#remote_tags' do