diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 16:54:15 +0300 |
commit | be834a25982746ffd85252ff502df42bb88cb9d5 (patch) | |
tree | b4d6a8ba0931e12fac08f05abea33a3b8ec2c8a2 /spec/lib/gitlab/git_access_snippet_spec.rb | |
parent | ee925a3597f27e92f83a50937a64068109675b3d (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc32
Diffstat (limited to 'spec/lib/gitlab/git_access_snippet_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git_access_snippet_spec.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/lib/gitlab/git_access_snippet_spec.rb b/spec/lib/gitlab/git_access_snippet_spec.rb index 3b8b5fd82c6..362ea3c006e 100644 --- a/spec/lib/gitlab/git_access_snippet_spec.rb +++ b/spec/lib/gitlab/git_access_snippet_spec.rb @@ -232,29 +232,6 @@ RSpec.describe Gitlab::GitAccessSnippet do end end - context 'when geo is enabled', if: Gitlab.ee? do - let(:user) { snippet.author } - let!(:primary_node) { FactoryBot.create(:geo_node, :primary) } - - before do - allow(::Gitlab::Database).to receive(:read_only?).and_return(true) - allow(::Gitlab::Geo).to receive(:secondary_with_primary?).and_return(true) - end - - # Without override, push access would return Gitlab::GitAccessResult::CustomAction - it 'skips geo for snippet' do - expect { push_access_check }.to raise_forbidden(/You can't push code to a read-only GitLab instance/) - end - - context 'when user is migration bot' do - let(:user) { migration_bot } - - it 'skips geo for snippet' do - expect { push_access_check }.to raise_forbidden(/You can't push code to a read-only GitLab instance/) - end - end - end - context 'when changes are specific' do let(:changes) { "2d1db523e11e777e49377cfb22d368deec3f0793 ddd0f15ae83993f5cb66a927a28673882e99100b master" } let(:user) { snippet.author } |