nlsr: Pass keyChain to NLSR constructor
refs: #3742
Change-Id: I186784da2989aa8bcc396c81c4fc80254a6f313a
diff --git a/tests/publisher/publisher-fixture.hpp b/tests/publisher/publisher-fixture.hpp
index eda0f71..4466b9b 100644
--- a/tests/publisher/publisher-fixture.hpp
+++ b/tests/publisher/publisher-fixture.hpp
@@ -34,7 +34,7 @@
public:
PublisherFixture()
: face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, lsdb(nlsr, g_scheduler, nlsr.getSyncLogicHandler())
{
}
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index d7ace96..d326765 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -29,6 +29,7 @@
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/util/scheduler.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
#include <ndn-cxx/util/time-unit-test-clock.hpp>
namespace nlsr {
@@ -45,6 +46,7 @@
protected:
boost::asio::io_service g_ioService;
ndn::Scheduler g_scheduler;
+ ndn::KeyChain g_keyChain;
};
class UnitTestTimeFixture : public BaseFixture
diff --git a/tests/test-conf-file-processor.cpp b/tests/test-conf-file-processor.cpp
index c36892b..d65fa45 100644
--- a/tests/test-conf-file-processor.cpp
+++ b/tests/test-conf-file-processor.cpp
@@ -133,7 +133,7 @@
public:
ConfFileProcessorFixture()
: face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, CONFIG_FILE("unit-test-nlsr.conf")
, m_logConfigFileName(boost::filesystem::unique_path().native())
, m_logFileName(boost::filesystem::unique_path().native())
diff --git a/tests/test-hyperbolic-calculator.cpp b/tests/test-hyperbolic-calculator.cpp
index de1c86a..97daac0 100644
--- a/tests/test-hyperbolic-calculator.cpp
+++ b/tests/test-hyperbolic-calculator.cpp
@@ -46,7 +46,7 @@
public:
HyperbolicCalculatorFixture()
: face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, routingTable(nlsr.getRoutingTable())
, adjacencies(nlsr.getAdjacencyList())
, lsdb(nlsr.getLsdb())
diff --git a/tests/test-link-state-calculator.cpp b/tests/test-link-state-calculator.cpp
index 2e7a27a..04c5ff4 100644
--- a/tests/test-link-state-calculator.cpp
+++ b/tests/test-link-state-calculator.cpp
@@ -42,7 +42,7 @@
public:
LinkStateCalculatorFixture()
: face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, routingTable(nlsr.getRoutingTable())
, lsdb(nlsr.getLsdb())
{
diff --git a/tests/test-lsdb.cpp b/tests/test-lsdb.cpp
index dc2f51f..959c079 100644
--- a/tests/test-lsdb.cpp
+++ b/tests/test-lsdb.cpp
@@ -40,7 +40,7 @@
public:
LsdbFixture()
: face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, sync(*face, nlsr.getLsdb(), nlsr.getConfParameter(), nlsr.getSequencingManager())
, lsdb(nlsr.getLsdb())
, conf(nlsr.getConfParameter())
diff --git a/tests/test-name-prefix-table.cpp b/tests/test-name-prefix-table.cpp
index bd0e710..58e771e 100644
--- a/tests/test-name-prefix-table.cpp
+++ b/tests/test-name-prefix-table.cpp
@@ -33,7 +33,7 @@
public:
NamePrefixTableFixture()
: face(make_shared<ndn::util::DummyClientFace>(g_ioService))
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, lsdb(nlsr.getLsdb())
, npt(nlsr.getNamePrefixTable())
{
diff --git a/tests/test-nlsr.cpp b/tests/test-nlsr.cpp
index 941e1db..531ea8c 100644
--- a/tests/test-nlsr.cpp
+++ b/tests/test-nlsr.cpp
@@ -37,7 +37,7 @@
public:
NlsrFixture()
: face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, lsdb(nlsr.getLsdb())
, neighbors(nlsr.getAdjacencyList())
{
@@ -126,7 +126,7 @@
BOOST_FIXTURE_TEST_CASE(FaceDestroyEvent, UnitTestTimeFixture)
{
shared_ptr<ndn::util::DummyClientFace> face = make_shared<ndn::util::DummyClientFace>(g_ioService);
- Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face));
+ Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
Lsdb& lsdb = nlsr.getLsdb();
// Simulate loading configuration file
@@ -237,7 +237,7 @@
BOOST_FIXTURE_TEST_CASE(FaceDestroyEventInactive, UnitTestTimeFixture)
{
shared_ptr<ndn::util::DummyClientFace> face = make_shared<ndn::util::DummyClientFace>(g_ioService);
- Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face));
+ Nlsr nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
Lsdb& lsdb = nlsr.getLsdb();
// Simulate loading configuration file
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index e836976..0000de9 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -36,7 +36,7 @@
public:
SyncLogicFixture()
: face(make_shared<ndn::util::DummyClientFace>())
- , nlsr(g_ioService, g_scheduler, ndn::ref(*face))
+ , nlsr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain)
, sync(nlsr.getSyncLogicHandler())
, CONFIG_NETWORK("/ndn")
, CONFIG_SITE("/site")
@@ -98,7 +98,7 @@
BOOST_AUTO_TEST_CASE(UpdateForOtherHR)
{
- Nlsr nlsr_hr(g_ioService, g_scheduler, ndn::ref(*face));
+ Nlsr nlsr_hr(g_ioService, g_scheduler, ndn::ref(*face), g_keyChain);
SyncLogicHandler& sync_hr(nlsr_hr.getSyncLogicHandler());
nlsr_hr.getConfParameter().setNetwork(CONFIG_NETWORK);
@@ -132,7 +132,7 @@
BOOST_AUTO_TEST_CASE(UpdateForOtherHRDry)
{
- Nlsr nlsr_hrdry(g_ioService, g_scheduler, ndn::ref(*face));
+ Nlsr nlsr_hrdry(g_ioService, g_scheduler, ndn::ref(*face),g_keyChain);
SyncLogicHandler& sync_hrdry(nlsr_hrdry.getSyncLogicHandler());
nlsr_hrdry.getConfParameter().setNetwork(CONFIG_NETWORK);
diff --git a/tests/update/test-prefix-update-processor.cpp b/tests/update/test-prefix-update-processor.cpp
index 983f698..67c00f0 100644
--- a/tests/update/test-prefix-update-processor.cpp
+++ b/tests/update/test-prefix-update-processor.cpp
@@ -46,7 +46,7 @@
: face(make_shared<ndn::util::DummyClientFace>(g_ioService))
, siteIdentity(ndn::Name("/ndn/edu/test-site").appendVersion())
, opIdentity(ndn::Name(siteIdentity).append(ndn::Name("%C1.Operator")).appendVersion())
- , nlsr(g_ioService, g_scheduler, *face)
+ , nlsr(g_ioService, g_scheduler, *face, g_keyChain)
, keyPrefix(("/ndn/broadcast"))
, updateProcessor(nlsr.getPrefixUpdateProcessor())
, SITE_CERT_PATH(boost::filesystem::current_path() / std::string("site.cert"))