Skip to content

Commit

Permalink
Use direct file store in prometheus tests
Browse files Browse the repository at this point in the history
As the DirectFileStore is used in production, tests should make use of
this 'metrics store' as well.
  • Loading branch information
philippthun authored and johha committed Feb 1, 2024
1 parent 9f13183 commit be9b15a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
module VCAP::CloudController::Metrics
RSpec.describe PrometheusUpdater do
let(:updater) { PrometheusUpdater.new(prom_client) }
let(:prom_client) { Prometheus::Client::Registry.new }
let(:tmpdir) { Dir.mktmpdir }
let(:prom_client) do
Prometheus::Client.config.data_store = Prometheus::Client::DataStores::DirectFileStore.new(dir: tmpdir)
Prometheus::Client::Registry.new
end

describe 'Prometheus creation guards work correctly' do
# This might look to be a duplicate of 'records the current number of deployments that are DEPLOYING'
Expand Down

0 comments on commit be9b15a

Please sign in to comment.