Commit 9d5e67c9 authored by Valery Sizov's avatar Valery Sizov

update specs for metrics_update_worker

parent f6f55f4a
......@@ -13,16 +13,7 @@ RSpec.describe Geo::MetricsUpdateWorker, :geo do
stub_current_geo_node(secondary)
end
it 'does not execute when Prometheus metrics are disabled' do
allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(false)
expect(Geo::MetricsUpdateService).not_to receive(:new)
subject.perform
end
it 'executes when Prometheus metrics are enabled' do
allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(true)
it 'executes MetricsUpdateService' do
service = double(:service, execute: true)
expect(Geo::MetricsUpdateService).to receive(:new).and_return(service)
......
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