Remove unncessary stub for Gitlab::Geo.current_node method

parent a395d194
...@@ -22,13 +22,12 @@ describe Gitlab::Geo::LogCursor::Daemon do ...@@ -22,13 +22,12 @@ describe Gitlab::Geo::LogCursor::Daemon do
end end
context 'when replaying a repository updated event' do context 'when replaying a repository updated event' do
let!(:geo_node) { create(:geo_node) } let!(:geo_node) { create(:geo_node, :current) }
let(:event_log) { create(:geo_event_log, :updated_event) } let(:event_log) { create(:geo_event_log, :updated_event) }
let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) } let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) }
let(:repository_updated_event) { event_log.repository_updated_event } let(:repository_updated_event) { event_log.repository_updated_event }
before do before do
allow(Gitlab::Geo).to receive(:current_node).and_return(geo_node)
allow(subject).to receive(:exit?).and_return(false, true) allow(subject).to receive(:exit?).and_return(false, true)
end end
...@@ -83,7 +82,7 @@ describe Gitlab::Geo::LogCursor::Daemon do ...@@ -83,7 +82,7 @@ describe Gitlab::Geo::LogCursor::Daemon do
end end
context 'when node have group restrictions' do context 'when node have group restrictions' do
let(:geo_node) { create(:geo_node) } let(:geo_node) { create(:geo_node, :current) }
let(:group) { create(:group) } let(:group) { create(:group) }
let(:project) { create(:empty_project, group: group) } let(:project) { create(:empty_project, group: group) }
let(:repository_updated_event) { create(:geo_repository_updated_event, project: project) } let(:repository_updated_event) { create(:geo_repository_updated_event, project: project) }
...@@ -91,7 +90,6 @@ describe Gitlab::Geo::LogCursor::Daemon do ...@@ -91,7 +90,6 @@ describe Gitlab::Geo::LogCursor::Daemon do
let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) } let!(:event_log_state) { create(:geo_event_log_state, event_id: event_log.id - 1) }
before do before do
allow(Gitlab::Geo).to receive(:current_node).and_return(geo_node)
allow(subject).to receive(:exit?).and_return(false, true) allow(subject).to receive(:exit?).and_return(false, true)
end end
......
...@@ -66,7 +66,6 @@ describe Geo::RepositorySyncWorker do ...@@ -66,7 +66,6 @@ describe Geo::RepositorySyncWorker do
context 'when node have group restrictions' do context 'when node have group restrictions' do
before do before do
allow(Gitlab::Geo).to receive(:current_node).and_return(secondary)
secondary.update_attribute(:groups, [group]) secondary.update_attribute(:groups, [group])
end 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