blob: d46de893a8aa1daac0e86b0d6f30e5b55c403d87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Gitlab::Usage::Metrics::Instrumentations::DistinctCountProjectsWithExpirationPolicyMetric do
before_all do
create(:container_expiration_policy, enabled: false)
create(:container_expiration_policy, enabled: false, created_at: 29.days.ago)
create(:container_expiration_policy, enabled: true)
end
it_behaves_like 'a correct instrumented metric value', { time_frame: '28d', options: { enabled: false } } do
let(:expected_value) { 1 }
end
it_behaves_like 'a correct instrumented metric value', { time_frame: 'all', options: { enabled: false } } do
let(:expected_value) { 2 }
end
end
|