summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/common
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2021-01-18 14:47:52 +0100
committerTor Egge <Tor.Egge@broadpark.no>2021-01-18 14:47:52 +0100
commit5038193d912eacc04d9d3ecc5176dbe7fa858a73 (patch)
tree23fef4984ea02b26d7f201cc27c093a17d9bc8a9 /storage/src/tests/common
parent5ce314d5989ce4753004d8e13faafb905217bc8b (diff)
Wire in HostInfo to FileStorManager.
Diffstat (limited to 'storage/src/tests/common')
-rw-r--r--storage/src/tests/common/teststorageapp.cpp6
-rw-r--r--storage/src/tests/common/teststorageapp.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/storage/src/tests/common/teststorageapp.cpp b/storage/src/tests/common/teststorageapp.cpp
index 04dc1a03dd3..f932786e2e2 100644
--- a/storage/src/tests/common/teststorageapp.cpp
+++ b/storage/src/tests/common/teststorageapp.cpp
@@ -134,7 +134,8 @@ TestServiceLayerApp::TestServiceLayerApp(vespalib::stringref configId)
lib::NodeType::STORAGE, getIndexFromConfig(configId), configId),
_compReg(dynamic_cast<ServiceLayerComponentRegisterImpl&>(TestStorageApp::getComponentRegister())),
_persistenceProvider(),
- _executor(vespalib::SequencedTaskExecutor::create(test_executor, 1))
+ _executor(vespalib::SequencedTaskExecutor::create(test_executor, 1)),
+ _host_info()
{
lib::NodeState ns(*_nodeStateUpdater.getReportedNodeState());
_nodeStateUpdater.setReportedNodeState(ns);
@@ -146,7 +147,8 @@ TestServiceLayerApp::TestServiceLayerApp(NodeIndex index,
lib::NodeType::STORAGE, index, configId),
_compReg(dynamic_cast<ServiceLayerComponentRegisterImpl&>(TestStorageApp::getComponentRegister())),
_persistenceProvider(),
- _executor(vespalib::SequencedTaskExecutor::create(test_executor, 1))
+ _executor(vespalib::SequencedTaskExecutor::create(test_executor, 1)),
+ _host_info()
{
lib::NodeState ns(*_nodeStateUpdater.getReportedNodeState());
_nodeStateUpdater.setReportedNodeState(ns);
diff --git a/storage/src/tests/common/teststorageapp.h b/storage/src/tests/common/teststorageapp.h
index b5295fe94a3..433f535546f 100644
--- a/storage/src/tests/common/teststorageapp.h
+++ b/storage/src/tests/common/teststorageapp.h
@@ -23,6 +23,7 @@
#include <persistence/spi/types.h>
#include <vespa/storage/bucketdb/storbucketdb.h>
#include <vespa/storage/common/doneinitializehandler.h>
+#include <vespa/storage/common/hostreporter/hostinfo.h>
#include <vespa/storage/common/node_identity.h>
#include <vespa/storage/common/nodestateupdater.h>
#include <vespa/storage/frameworkimpl/component/distributorcomponentregisterimpl.h>
@@ -112,6 +113,7 @@ class TestServiceLayerApp : public TestStorageApp
ServiceLayerComponentRegisterImpl& _compReg;
PersistenceProviderUP _persistenceProvider;
std::unique_ptr<vespalib::ISequencedTaskExecutor> _executor;
+ HostInfo _host_info;
public:
TestServiceLayerApp(vespalib::stringref configId);
@@ -122,6 +124,7 @@ public:
void setPersistenceProvider(PersistenceProviderUP);
ServiceLayerComponentRegisterImpl& getComponentRegister() { return _compReg; }
+ HostInfo &get_host_info() noexcept { return _host_info; }
spi::PersistenceProvider& getPersistenceProvider();