diff options
Diffstat (limited to 'spec/services/git/branch_push_service_spec.rb')
-rw-r--r-- | spec/services/git/branch_push_service_spec.rb | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/services/git/branch_push_service_spec.rb b/spec/services/git/branch_push_service_spec.rb index d70e458ba5e..5a637b0956b 100644 --- a/spec/services/git/branch_push_service_spec.rb +++ b/spec/services/git/branch_push_service_spec.rb @@ -554,44 +554,6 @@ RSpec.describe Git::BranchPushService, services: true do end end - describe "housekeeping", :clean_gitlab_redis_cache, :clean_gitlab_redis_queues, :clean_gitlab_redis_shared_state do - let(:housekeeping) { Repositories::HousekeepingService.new(project) } - - before do - allow(Repositories::HousekeepingService).to receive(:new).and_return(housekeeping) - end - - it 'does not perform housekeeping when not needed' do - expect(housekeeping).not_to receive(:execute) - - execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref) - end - - context 'when housekeeping is needed' do - before do - allow(housekeeping).to receive(:needed?).and_return(true) - end - - it 'performs housekeeping' do - expect(housekeeping).to receive(:execute) - - execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref) - end - - it 'does not raise an exception' do - allow(housekeeping).to receive(:try_obtain_lease).and_return(false) - - execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref) - end - end - - it 'increments the push counter' do - expect(housekeeping).to receive(:increment!) - - execute_service(project, user, oldrev: oldrev, newrev: newrev, ref: ref) - end - end - describe "CI environments" do context 'create branch' do let(:oldrev) { blankrev } |