Commit a79a60a5 authored by James Lopez's avatar James Lopez

Merge branch '12742-remove-quarantine-push-size-check-flag' into 'master'

Remove quarantine_push_size_check feature flag

See merge request gitlab-org/gitlab-ee!14904
parents e25bacf5 c5dfdd7e
......@@ -120,7 +120,7 @@ module EE
def check_quarantine_size?
git_env = ::Gitlab::Git::HookEnv.all(repository.gl_repository)
git_env['GIT_OBJECT_DIRECTORY_RELATIVE'].present? && ::Feature.enabled?(:quarantine_push_size_check, default_enabled: true)
git_env['GIT_OBJECT_DIRECTORY_RELATIVE'].present?
end
def check_repository_disk_size
......
......@@ -262,18 +262,15 @@ describe Gitlab::GitAccess do
.to receive(:all)
.with(repository.gl_repository)
.and_return({ 'GIT_OBJECT_DIRECTORY_RELATIVE' => 'objects' })
end
context 'when quarantine_push_size_check feature is enabled (default)' do
let(:object_directory_size) { 1.megabyte }
before do
# Stub the object directory size to "simulate" quarantine size
allow(repository)
.to receive(:object_directory_size)
.and_return(object_directory_size)
end
let(:object_directory_size) { 1.megabyte }
context 'when repository size is over limit' do
let(:repository_size) { 2.megabytes }
let(:repository_size_limit) { 1.megabyte }
......@@ -307,15 +304,6 @@ describe Gitlab::GitAccess do
end
end
context 'when quarantine_push_size_check feature is disabled' do
before do
stub_feature_flags(quarantine_push_size_check: false)
end
it_behaves_like 'a push to repository using git-rev-list for checking against repository size limit'
end
end
context 'when GIT_OBJECT_DIRECTORY_RELATIVE env var is not set' do
it_behaves_like 'a push to repository using git-rev-list for checking against repository size limit'
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment