tests: add FreshnessPeriod where MustBeFresh is used
Also, set MustBeFresh in autoconfig-server HubData test, to reflect the behavior of autoconfig client. refs #4913 Change-Id: I0af29378630a2208e98ef0913d83668a603e9a88
This commit is contained in:
1 parent
25d9728d2f
commit
73b4980eb6
3 files changed
+3
No files matched your search
@@ -191,6 +191,7 @@ private:
|
||||
}
|
||||
|
||||
auto data = make_shared<Data>(name);
|
||||
data->setFreshnessPeriod(1_s);
|
||||
data->setFinalBlock(name[-1]);
|
||||
data->setContent(std::forward<ContentArgs>(contentArgs)...);
|
||||
this->signDatasetReply(*data);
|
||||
|
||||
@@ -67,6 +67,7 @@ BOOST_AUTO_TEST_CASE(HubData)
|
||||
this->initialize(options);
|
||||
|
||||
Interest interest("/localhop/ndn-autoconf/hub");
|
||||
interest.setMustBeFresh(true);
|
||||
face.receive(interest);
|
||||
face.processEvents(500_ms);
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ BOOST_AUTO_TEST_CASE(Normal)
|
||||
if (interest.getName() == "/localhop/ndn-autoconf/hub") {
|
||||
const char FACEURI[] = "udp://router.example.net";
|
||||
auto data = makeData(Name("/localhop/ndn-autoconf/hub").appendVersion());
|
||||
data->setFreshnessPeriod(1_s);
|
||||
data->setContent(makeBinaryBlock(tlv::nfd::Uri, FACEURI, ::strlen(FACEURI)));
|
||||
face.receive(*data);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user