Commit 60a22a59 authored by Gabriel Mazetto's avatar Gabriel Mazetto

fix specs and comments changing push -> sync/fetch

parent ad2d0041
...@@ -224,7 +224,7 @@ describe Geo::ProjectRegistry do ...@@ -224,7 +224,7 @@ describe Geo::ProjectRegistry do
end end
context 'with a number of syncs' do context 'with a number of syncs' do
it 'returns the number of pushes' do it 'returns the number of syncs' do
2.times { Geo::ProjectHousekeepingService.new(project).increment! } 2.times { Geo::ProjectHousekeepingService.new(project).increment! }
expect(subject.syncs_since_gc).to eq(2) expect(subject.syncs_since_gc).to eq(2)
...@@ -233,7 +233,7 @@ describe Geo::ProjectRegistry do ...@@ -233,7 +233,7 @@ describe Geo::ProjectRegistry do
end end
describe '#increment_syncs_since_gc' do describe '#increment_syncs_since_gc' do
it 'increments the number of pushes since the last GC' do it 'increments the number of syncs since the last GC' do
3.times { subject.increment_syncs_since_gc! } 3.times { subject.increment_syncs_since_gc! }
expect(subject.syncs_since_gc).to eq(3) expect(subject.syncs_since_gc).to eq(3)
...@@ -241,7 +241,7 @@ describe Geo::ProjectRegistry do ...@@ -241,7 +241,7 @@ describe Geo::ProjectRegistry do
end end
describe '#reset_syncs_since_gc' do describe '#reset_syncs_since_gc' do
it 'resets the number of pushes since the last GC' do it 'resets the number of syncs since the last GC' do
3.times { subject.increment_syncs_since_gc! } 3.times { subject.increment_syncs_since_gc! }
subject.reset_syncs_since_gc! subject.reset_syncs_since_gc!
......
...@@ -45,13 +45,13 @@ describe Geo::ProjectHousekeepingService do ...@@ -45,13 +45,13 @@ describe Geo::ProjectHousekeepingService do
allow(service).to receive(:lease_key).and_return(:the_lease_key) allow(service).to receive(:lease_key).and_return(:the_lease_key)
allow(service).to receive(:try_obtain_lease).and_return(:the_uuid) allow(service).to receive(:try_obtain_lease).and_return(:the_uuid)
# At push 200 # At fetch 200
expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :gc, :the_lease_key, :the_uuid) expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :gc, :the_lease_key, :the_uuid)
.exactly(1).times .exactly(1).times
# At push 50, 100, 150 # At fetch 50, 100, 150
expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :full_repack, :the_lease_key, :the_uuid) expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :full_repack, :the_lease_key, :the_uuid)
.exactly(3).times .exactly(3).times
# At push 10, 20, ... (except those above) # At fetch 10, 20, ... (except those above)
expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :incremental_repack, :the_lease_key, :the_uuid) expect(GitGarbageCollectWorker).to receive(:perform_async).with(project.id, :incremental_repack, :the_lease_key, :the_uuid)
.exactly(16).times .exactly(16).times
......
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