move callbacks from CaModule to each CaItem
Change-Id: I8e8bef0997c6826f6f007f7ad7156957cc2fcd72
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index fbd7358..27cb9a7 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -60,8 +60,8 @@
util::DummyClientFace face(m_io, {true, true});
CaModule ca(face, m_keyChain, "tests/unit-tests/ca.conf.test");
- ca.setProbeHandler([&] (const std::string& probeInfo) {
- return probeInfo;
+ ca.setProbeHandler(Name("/ndn/site1"), [&] (const std::string& probeInfo) {
+ return probeInfo + "example";
});
advanceClocks(time::milliseconds(20), 60);
@@ -75,7 +75,7 @@
count++;
BOOST_CHECK(security::verifySignature(response, cert));
JsonSection contentJson = ClientModule::getJsonFromData(response);
- BOOST_CHECK_EQUAL(contentJson.get(JSON_IDNENTIFIER, ""), "/ndn/site1/zhiyi");
+ BOOST_CHECK_EQUAL(contentJson.get(JSON_IDNENTIFIER, ""), "/ndn/site1/zhiyiexample");
});
face.receive(interest);
@@ -121,9 +121,6 @@
util::DummyClientFace face2(m_io, {true, true});
CaModule ca(face, m_keyChain, "tests/unit-tests/ca.conf.test");
- ca.setProbeHandler([&] (const std::string& probeInfo) {
- return probeInfo;
- });
advanceClocks(time::milliseconds(20), 60);
Name identityName("/ndn/site1");