diff options
Diffstat (limited to 'spec/support/shared_examples/services/service_ping')
2 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/shared_examples/services/service_ping/service_ping_payload_with_all_expected_metrics_shared_examples.rb b/spec/support/shared_examples/services/service_ping/service_ping_payload_with_all_expected_metrics_shared_examples.rb index 535e7291b7e..856810a4de1 100644 --- a/spec/support/shared_examples/services/service_ping/service_ping_payload_with_all_expected_metrics_shared_examples.rb +++ b/spec/support/shared_examples/services/service_ping/service_ping_payload_with_all_expected_metrics_shared_examples.rb @@ -2,6 +2,8 @@ RSpec.shared_examples 'service ping payload with all expected metrics' do specify do + allow(ApplicationRecord.database).to receive(:flavor).and_return(nil) + aggregate_failures do expected_metrics.each do |metric| is_expected.to have_usage_metric metric['key_path'] diff --git a/spec/support/shared_examples/services/service_ping/service_ping_payload_without_restricted_metrics_shared_examples.rb b/spec/support/shared_examples/services/service_ping/service_ping_payload_without_restricted_metrics_shared_examples.rb index 9f18174cbc7..e05239a9a36 100644 --- a/spec/support/shared_examples/services/service_ping/service_ping_payload_without_restricted_metrics_shared_examples.rb +++ b/spec/support/shared_examples/services/service_ping/service_ping_payload_without_restricted_metrics_shared_examples.rb @@ -2,6 +2,8 @@ RSpec.shared_examples 'service ping payload without restricted metrics' do specify do + allow(ApplicationRecord.database).to receive(:flavor).and_return(nil) + aggregate_failures do restricted_metrics.each do |metric| is_expected.not_to have_usage_metric metric['key_path'] |