From 1e234886e11e1d4b78507d240e3bd7234f203466 Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Tue, 14 May 2024 12:31:29 +0000 Subject: Remove usages of deprecated DirConfig in storage unit tests Introduce a distinct `StorageConfigSet` which wraps the actual underlying config objects and exposes them through a unified `ConfigUri`. --- storage/src/tests/storageserver/statereportertest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'storage/src/tests/storageserver/statereportertest.cpp') diff --git a/storage/src/tests/storageserver/statereportertest.cpp b/storage/src/tests/storageserver/statereportertest.cpp index c233c6e9314..29d3daf9b86 100644 --- a/storage/src/tests/storageserver/statereportertest.cpp +++ b/storage/src/tests/storageserver/statereportertest.cpp @@ -1,14 +1,15 @@ // Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include #include #include #include @@ -35,7 +36,7 @@ struct StateReporterTest : Test { std::unique_ptr _top; DummyApplicationGenerationFether _generationFetcher; std::unique_ptr _stateReporter; - std::unique_ptr _config; + std::unique_ptr _config; std::unique_ptr _topSet; std::unique_ptr _metricManager; std::shared_ptr _filestorMetrics; @@ -68,9 +69,8 @@ StateReporterTest::StateReporterTest() StateReporterTest::~StateReporterTest() = default; void StateReporterTest::SetUp() { - _config = std::make_unique(getStandardConfig(true, "statereportertest")); - - _node = std::make_unique(NodeIndex(0), _config->getConfigId()); + _config = StorageConfigSet::make_storage_node_config(); + _node = std::make_unique(NodeIndex(0), _config->config_uri()); _node->setupDummyPersistence(); _clock = &_node->getClock(); _clock->setAbsoluteTimeInSeconds(1000000); @@ -90,7 +90,7 @@ void StateReporterTest::SetUp() { _filestorMetrics->initDiskMetrics(1, 1); _topSet->registerMetric(*_filestorMetrics); - _metricManager->init(config::ConfigUri(_config->getConfigId())); + _metricManager->init(_config->config_uri()); } void StateReporterTest::TearDown() { -- cgit v1.2.3