**breaking** Change NLSR to nlsr for various prefixes
src: register router prefix to fix remote requests
refs: #4543
Change-Id: I698484318bf8e641f955ea40e6c51c6865cad8bf
diff --git a/tests/publisher/test-dataset-interest-handler.cpp b/tests/publisher/test-dataset-interest-handler.cpp
index 7cc4a84..bbb37a7 100644
--- a/tests/publisher/test-dataset-interest-handler.cpp
+++ b/tests/publisher/test-dataset-interest-handler.cpp
@@ -57,6 +57,8 @@
BOOST_AUTO_TEST_CASE(Localhost)
{
+ checkPrefixRegistered(Nlsr::LOCALHOST_PREFIX);
+
// Install adjacency LSA
AdjLsa adjLsa;
adjLsa.setOrigRouter("/RouterA");
@@ -108,6 +110,13 @@
BOOST_AUTO_TEST_CASE(Routername)
{
+ ndn::Name regRouterPrefix(nlsr.getConfParameter().getRouterPrefix());
+ regRouterPrefix.append("nlsr");
+ // Should already be added to dispatcher
+ BOOST_CHECK_THROW(nlsr.getDispatcher().addTopPrefix(regRouterPrefix), std::out_of_range);
+
+ checkPrefixRegistered(regRouterPrefix);
+
//Install adjacencies LSA
AdjLsa adjLsa;
adjLsa.setOrigRouter("/RouterA");
@@ -129,22 +138,22 @@
rt1.addNextHop(DEST_ROUTER, nh);
// Request adjacency LSAs
- face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/lsdb").append("adjacencies")));
+ face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("adjacencies")));
processDatasetInterest(face,
[] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::AdjacencyLsa; });
// Request coordinate LSAs
- face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/lsdb").append("coordinates")));
+ face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("coordinates")));
processDatasetInterest(face,
[] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::CoordinateLsa; });
// Request Name LSAs
- face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/lsdb").append("names")));
+ face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/lsdb").append("names")));
processDatasetInterest(face,
[] (const ndn::Block& block) { return block.type() == ndn::tlv::nlsr::NameLsa; });
// Request Routing Table
- face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/routing-table")));
+ face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/nlsr/routing-table")));
processDatasetInterest(face,
[] (const ndn::Block& block) {
return block.type() == ndn::tlv::nlsr::RoutingTable; });