diff options
Diffstat (limited to 'spec/lib/gitlab/usage_data_spec.rb')
-rw-r--r-- | spec/lib/gitlab/usage_data_spec.rb | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 46ed4b57d3a..cb645ae3e53 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -624,7 +624,6 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do it 'gathers usage data' do expect(subject[:projects_with_expiration_policy_enabled]).to eq 19 - expect(subject[:projects_with_expiration_policy_disabled]).to eq 5 expect(subject[:projects_with_expiration_policy_enabled_with_keep_n_unset]).to eq 1 expect(subject[:projects_with_expiration_policy_enabled_with_keep_n_set_to_1]).to eq 1 @@ -758,13 +757,6 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do end end - describe '.usage_counters' do - subject { described_class.usage_counters } - - it { is_expected.to include(:kubernetes_agent_gitops_sync) } - it { is_expected.to include(:kubernetes_agent_k8s_api_proxy_request) } - end - describe '.usage_data_counters' do subject { described_class.usage_data_counters } @@ -1057,12 +1049,13 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do before do allow(described_class).to receive(:operating_system).and_return('ubuntu-20.04') - expect(prometheus_client).to receive(:query).with(/gitlab_usage_ping:gitaly_apdex:ratio_avg_over_time_5m/).and_return([ - { - 'metric' => {}, - 'value' => [1616016381.473, '0.95'] - } - ]) + expect(prometheus_client).to receive(:query) + .with(/gitlab_usage_ping:gitaly_apdex:ratio_avg_over_time_5m/) + .and_return( + [ + { 'metric' => {}, + 'value' => [1616016381.473, '0.95'] } + ]) expect(described_class).to receive(:with_prometheus_client).and_yield(prometheus_client) end |