diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-02-07 17:41:03 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-02-12 21:32:55 +0100 |
commit | bafab35e84e88f77d850ea13973d8fddc110225a (patch) | |
tree | 3399be36548fcbc75da6fd6eeb3fa936519adfa0 /spec/workers | |
parent | c00a17f653aaf1c0ee69d2726be182d015d3df5c (diff) | |
download | gitlab-ce-bafab35e84e88f77d850ea13973d8fddc110225a.tar.gz |
Use Prometheus counter instead of redis
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/check_gcp_project_billing_worker_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/workers/check_gcp_project_billing_worker_spec.rb b/spec/workers/check_gcp_project_billing_worker_spec.rb index 5f473d05e60..132f9751f92 100644 --- a/spec/workers/check_gcp_project_billing_worker_spec.rb +++ b/spec/workers/check_gcp_project_billing_worker_spec.rb @@ -87,9 +87,7 @@ describe CheckGcpProjectBillingWorker do end it 'does not increment the billing change counter' do - Gitlab::Redis::SharedState.with do |redis| - expect(redis).not_to receive(:incr) - end + expect_any_instance_of(described_class).not_to receive(:billing_changed_counter) subject end @@ -101,9 +99,7 @@ describe CheckGcpProjectBillingWorker do end it 'increments the billing change counter' do - Gitlab::Redis::SharedState.with do |redis| - expect(redis).to receive(:incr) - end + expect_any_instance_of(described_class).to receive_message_chain(:billing_changed_counter, :increment) subject end @@ -117,9 +113,7 @@ describe CheckGcpProjectBillingWorker do end it 'does not increment the billing change counter' do - Gitlab::Redis::SharedState.with do |redis| - expect(redis).not_to receive(:incr) - end + expect_any_instance_of(described_class).not_to receive(:billing_changed_counter) subject end |