tests: set CanBePrefix in daemon tests
This commit also updates makeInterest and makeNack functions
so that their APIs are compatible with ndn-cxx test suite.
refs #4581
Change-Id: I0c81740416c26a03450dc3a12c89944b72ce5901
diff --git a/tests/daemon/mgmt/cs-manager.t.cpp b/tests/daemon/mgmt/cs-manager.t.cpp
index 50c82b9..3f6b3aa 100644
--- a/tests/daemon/mgmt/cs-manager.t.cpp
+++ b/tests/daemon/mgmt/cs-manager.t.cpp
@@ -209,7 +209,7 @@
m_fwCnt.nCsHits.set(362);
m_fwCnt.nCsMisses.set(1493);
- receiveInterest(Interest("/localhost/nfd/cs/info").setCanBePrefix(true));
+ receiveInterest(*makeInterest("/localhost/nfd/cs/info", true));
Block dataset = concatenateResponses();
dataset.parse();
BOOST_REQUIRE_EQUAL(dataset.elements_size(), 1);
diff --git a/tests/daemon/mgmt/manager-base.t.cpp b/tests/daemon/mgmt/manager-base.t.cpp
index 0dace4e..c253bb8 100644
--- a/tests/daemon/mgmt/manager-base.t.cpp
+++ b/tests/daemon/mgmt/manager-base.t.cpp
@@ -114,7 +114,7 @@
m_manager.registerStatusDatasetHandler("test-status", handler);
setTopPrefix();
- receiveInterest(Interest("/localhost/nfd/test-module/test-status"));
+ receiveInterest(*makeInterest("/localhost/nfd/test-module/test-status", true));
BOOST_CHECK(isStatusDatasetCalled);
}
diff --git a/tests/daemon/mgmt/manager-common-fixture.cpp b/tests/daemon/mgmt/manager-common-fixture.cpp
index ed4344e..ebead64 100644
--- a/tests/daemon/mgmt/manager-common-fixture.cpp
+++ b/tests/daemon/mgmt/manager-common-fixture.cpp
@@ -148,7 +148,7 @@
Name prefix = name.getPrefix(-1);
uint64_t segmentNo = name.at(-1).toSegment() + 1;
// request for the next segment
- receiveInterest(Interest(prefix.appendSegment(segmentNo)));
+ receiveInterest(*makeInterest(prefix.appendSegment(segmentNo)));
}
size_t endIndex = startIndex + nResponses; // not included
diff --git a/tests/daemon/mgmt/rib-manager.t.cpp b/tests/daemon/mgmt/rib-manager.t.cpp
index dd34b5e..70369a7 100644
--- a/tests/daemon/mgmt/rib-manager.t.cpp
+++ b/tests/daemon/mgmt/rib-manager.t.cpp
@@ -445,7 +445,7 @@
}
}
- receiveInterest(Interest("/localhost/nfd/rib/list"));
+ receiveInterest(*makeInterest("/localhost/nfd/rib/list", true));
Block content = concatenateResponses();
content.parse();