Skip to content

Commit 2c02e21

Browse files
author
Daniel Magliola
committed
fixup! Add :most_recent aggregation to DirectFileStore
1 parent 15af410 commit 2c02e21

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/prometheus/client/data_stores/direct_file_store_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
it_behaves_like Prometheus::Client::DataStores
1616

17-
it "only accepts valid :aggregation as Metric Settings" do
17+
it "only accepts valid :aggregation values as Metric Settings" do
1818
expect do
1919
subject.for_metric(:metric_name,
2020
metric_type: :counter,
@@ -26,14 +26,18 @@
2626
metric_type: :counter,
2727
metric_settings: { aggregation: :invalid })
2828
end.to raise_error(Prometheus::Client::DataStores::DirectFileStore::InvalidStoreSettingsError)
29+
end
2930

31+
it "only accepts valid keys as Metric Settings" do
32+
# the only valid key at the moment is :aggregation
3033
expect do
3134
subject.for_metric(:metric_name,
3235
metric_type: :counter,
3336
metric_settings: { some_setting: true })
3437
end.to raise_error(Prometheus::Client::DataStores::DirectFileStore::InvalidStoreSettingsError)
38+
end
3539

36-
# :most_recent aggregation can only be used for gauges
40+
it "only accepts :most_recent aggregation for gauges" do
3741
expect do
3842
subject.for_metric(:metric_name,
3943
metric_type: :gauge,

0 commit comments

Comments
 (0)