tests: sign command Interests with CommandInterestSigner
Previously used ndn::v2::KeyChain::sign creates signed Interests, not
command Interests.
refs #4089
Change-Id: I7b13926d676ff81041f036eaec1978d82e8e1dfd
diff --git a/tests/daemon/mgmt/command-authenticator.t.cpp b/tests/daemon/mgmt/command-authenticator.t.cpp
index 7d2ed6e..498f44f 100644
--- a/tests/daemon/mgmt/command-authenticator.t.cpp
+++ b/tests/daemon/mgmt/command-authenticator.t.cpp
@@ -24,16 +24,15 @@
*/
#include "mgmt/command-authenticator.hpp"
-#include <ndn-cxx/security/signing-helpers.hpp>
#include <boost/filesystem.hpp>
#include "tests/test-common.hpp"
-#include "tests/identity-management-fixture.hpp"
+#include "tests/manager-common-fixture.hpp"
namespace nfd {
namespace tests {
-class CommandAuthenticatorFixture : public IdentityManagementTimeFixture
+class CommandAuthenticatorFixture : public CommandInterestSignerFixture
{
protected:
CommandAuthenticatorFixture()
@@ -63,17 +62,17 @@
authorize(const std::string& module, const Name& identity,
const function<void(Interest&)>& modifyInterest = nullptr)
{
- auto interest = makeInterest(Name("/prefix").append(module).append("verb"));
- m_keyChain.sign(*interest, signingByIdentity(identity));
+ Interest interest = this->makeControlCommandRequest(Name("/prefix/" + module + "/verb"),
+ ControlParameters(), identity);
if (modifyInterest != nullptr) {
- modifyInterest(*interest);
+ modifyInterest(interest);
}
ndn::mgmt::Authorization authorization = authorizations.at(module);
bool isAccepted = false;
bool isRejected = false;
- authorization(Name("/prefix"), *interest, nullptr,
+ authorization(Name("/prefix"), interest, nullptr,
[this, &isAccepted, &isRejected] (const std::string& requester) {
BOOST_REQUIRE_MESSAGE(!isAccepted && !isRejected,
"authorization function should invoke only one continuation");
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.hpp b/tests/daemon/mgmt/face-manager-command-fixture.hpp
index bf376f5..b00b9cc 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.hpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.hpp
@@ -29,10 +29,7 @@
#include "mgmt/face-manager.hpp"
#include "fw/face-table.hpp"
-#include "tests/identity-management-fixture.hpp"
-
-#include <ndn-cxx/mgmt/dispatcher.hpp>
-#include <ndn-cxx/util/dummy-client-face.hpp>
+#include "tests/manager-common-fixture.hpp"
namespace nfd {
namespace tests {
@@ -61,7 +58,7 @@
FaceManager manager;
};
-class FaceManagerCommandFixture : public IdentityManagementTimeFixture
+class FaceManagerCommandFixture : public CommandInterestSignerFixture
{
public:
FaceManagerCommandFixture();
diff --git a/tests/daemon/mgmt/face-manager-create-face.t.cpp b/tests/daemon/mgmt/face-manager-create-face.t.cpp
index 428e517..ac50913 100644
--- a/tests/daemon/mgmt/face-manager-create-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-create-face.t.cpp
@@ -228,15 +228,11 @@
using FaceType = typename T::first;
using CreateResult = typename T::second;
- Name commandName("/localhost/nfd/faces");
- commandName.append("create");
- commandName.append(FaceType::getParameters().wireEncode());
- auto command = makeInterest(commandName);
- m_keyChain.sign(*command);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/create", FaceType::getParameters());
bool hasCallbackFired = false;
- this->node1.face.onSendData.connect([this, command, &hasCallbackFired] (const Data& response) {
- if (!command->getName().isPrefixOf(response.getName())) {
+ this->node1.face.onSendData.connect([this, req, &hasCallbackFired] (const Data& response) {
+ if (!req.getName().isPrefixOf(response.getName())) {
return;
}
@@ -284,7 +280,7 @@
hasCallbackFired = true;
});
- this->node1.face.receive(*command);
+ this->node1.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
BOOST_CHECK(hasCallbackFired);
@@ -296,14 +292,8 @@
{
// create face
-
- Name commandName("/localhost/nfd/faces");
- commandName.append("create");
- commandName.append(FaceType::getParameters().wireEncode());
- auto command = makeInterest(commandName);
- m_keyChain.sign(*command);
-
- this->node1.face.receive(*command);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/create", FaceType::getParameters());
+ this->node1.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
}
@@ -313,17 +303,12 @@
{
// re-create face
-
- Name commandName("/localhost/nfd/faces");
- commandName.append("create");
- commandName.append(FaceType::getParameters().wireEncode());
- auto command = makeInterest(commandName);
- m_keyChain.sign(*command);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/create", FaceType::getParameters());
bool hasCallbackFired = false;
this->node1.face.onSendData.connect(
- [this, command, &hasCallbackFired, foundFace] (const Data& response) {
- if (!command->getName().isPrefixOf(response.getName())) {
+ [this, req, &hasCallbackFired, foundFace] (const Data& response) {
+ if (!req.getName().isPrefixOf(response.getName())) {
return;
}
@@ -338,7 +323,7 @@
hasCallbackFired = true;
});
- this->node1.face.receive(*command);
+ this->node1.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
BOOST_CHECK(hasCallbackFired);
diff --git a/tests/daemon/mgmt/face-manager-update-face.t.cpp b/tests/daemon/mgmt/face-manager-update-face.t.cpp
index 6757622..e81e3be 100644
--- a/tests/daemon/mgmt/face-manager-update-face.t.cpp
+++ b/tests/daemon/mgmt/face-manager-update-face.t.cpp
@@ -68,18 +68,15 @@
createFace(const ControlParameters& createParams,
bool isForOnDemandFace = false)
{
- Name commandName("/localhost/nfd/faces/create");
- commandName.append(createParams.wireEncode());
- auto command = makeInterest(commandName);
- m_keyChain.sign(*command);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/create", createParams);
// if this creation if for on-demand face then create it on node2
FaceManagerCommandNode& target = isForOnDemandFace ? this->node2 : this->node1;
bool hasCallbackFired = false;
signal::ScopedConnection connection = target.face.onSendData.connect(
- [&, command, isForOnDemandFace, this] (const Data& response) {
- if (!command->getName().isPrefixOf(response.getName())) {
+ [&, req, isForOnDemandFace, this] (const Data& response) {
+ if (!req.getName().isPrefixOf(response.getName())) {
return;
}
@@ -101,7 +98,7 @@
}
});
- target.face.receive(*command);
+ target.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
if (isForOnDemandFace) {
@@ -117,19 +114,16 @@
bool isSelfUpdating,
const function<void(const ControlResponse& resp)>& checkResp)
{
- Name commandName("/localhost/nfd/faces/update");
- commandName.append(requestParams.wireEncode());
- auto command = makeInterest(commandName);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/update", requestParams);
if (isSelfUpdating) {
// Attach IncomingFaceIdTag to interest
- command->setTag(make_shared<lp::IncomingFaceIdTag>(faceId));
+ req.setTag(make_shared<lp::IncomingFaceIdTag>(faceId));
}
- m_keyChain.sign(*command);
bool hasCallbackFired = false;
signal::ScopedConnection connection = this->node1.face.onSendData.connect(
- [this, command, &hasCallbackFired, &checkResp] (const Data& response) {
- if (!command->getName().isPrefixOf(response.getName())) {
+ [this, req, &hasCallbackFired, &checkResp] (const Data& response) {
+ if (!req.getName().isPrefixOf(response.getName())) {
return;
}
@@ -139,7 +133,7 @@
hasCallbackFired = true;
});
- this->node1.face.receive(*command);
+ this->node1.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
BOOST_CHECK(hasCallbackFired);
@@ -156,15 +150,12 @@
ControlParameters params;
params.setFaceId(faceId);
- Name commandName("/localhost/nfd/faces/destroy");
- commandName.append(params.wireEncode());
- auto command = makeInterest(commandName);
- m_keyChain.sign(*command);
+ Interest req = makeControlCommandRequest("/localhost/nfd/faces/destroy", params);
bool hasCallbackFired = false;
signal::ScopedConnection connection = this->node1.face.onSendData.connect(
- [this, command, &hasCallbackFired] (const Data& response) {
- if (!command->getName().isPrefixOf(response.getName())) {
+ [this, req, &hasCallbackFired] (const Data& response) {
+ if (!req.getName().isPrefixOf(response.getName())) {
return;
}
@@ -175,7 +166,7 @@
hasCallbackFired = true;
});
- this->node1.face.receive(*command);
+ this->node1.face.receive(req);
this->advanceClocks(time::milliseconds(1), 5);
BOOST_CHECK(hasCallbackFired);
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index 41dcb90..52e2a11 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -125,14 +125,13 @@
auto addedFace = addFace(REMOVE_LAST_NOTIFICATION | SET_SCOPE_LOCAL); // clear notification for creation
auto parameters = ControlParameters().setFaceId(addedFace->getId());
- auto command = makeControlCommandRequest("/localhost/nfd/faces/destroy", parameters);
-
- receiveInterest(command);
+ auto req = makeControlCommandRequest("/localhost/nfd/faces/destroy", parameters);
+ receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 2); // one response and one notification
// notification is already tested, so ignore it
- BOOST_CHECK_EQUAL(checkResponse(1, command->getName(), makeResponse(200, "OK", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(1, req.getName(), makeResponse(200, "OK", parameters)),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(addedFace->getId(), face::INVALID_FACEID);
@@ -141,13 +140,11 @@
BOOST_AUTO_TEST_CASE(NonExisting)
{
auto parameters = ControlParameters().setFaceId(65535);
- auto command = makeControlCommandRequest("/localhost/nfd/faces/destroy", parameters);
-
- receiveInterest(command);
+ auto req = makeControlCommandRequest("/localhost/nfd/faces/destroy", parameters);
+ receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
-
- BOOST_CHECK_EQUAL(checkResponse(0, command->getName(), makeResponse(200, "OK", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "OK", parameters)),
CheckResponseResult::OK);
}
@@ -162,7 +159,7 @@
addFace(REMOVE_LAST_NOTIFICATION | SET_URI_TEST | RANDOMIZE_COUNTERS);
}
- receiveInterest(makeInterest("/localhost/nfd/faces/list"));
+ receiveInterest(Interest("/localhost/nfd/faces/list"));
Block content;
BOOST_CHECK_NO_THROW(content = concatenateResponses());
@@ -202,10 +199,10 @@
auto invalidQueryName =
Name("/localhost/nfd/faces/query").append(ndn::makeStringBlock(tlv::Content, "invalid"));
- receiveInterest(makeInterest(querySchemeName)); // face1 and face2 expected
- receiveInterest(makeInterest(queryIdName)); // face1 expected
- receiveInterest(makeInterest(queryScopeName)); // face1 and face3 expected
- receiveInterest(makeInterest(invalidQueryName)); // nack expected
+ receiveInterest(Interest(querySchemeName)); // face1 and face2 expected
+ receiveInterest(Interest(queryIdName)); // face1 expected
+ receiveInterest(Interest(queryScopeName)); // face1 and face3 expected
+ receiveInterest(Interest(invalidQueryName)); // nack expected
BOOST_REQUIRE_EQUAL(m_responses.size(), 4);
@@ -311,7 +308,7 @@
addedChannels[channel->getUri().toString()] = channel;
}
- receiveInterest(makeInterest("/localhost/nfd/faces/channels"));
+ receiveInterest(Interest("/localhost/nfd/faces/channels"));
Block content;
BOOST_CHECK_NO_THROW(content = concatenateResponses());
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 6fc59d1..7c86e28 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -158,13 +158,13 @@
BOOST_AUTO_TEST_CASE(UnknownFaceId)
{
- auto command = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop",
- makeParameters("hello", face::FACEID_NULL, 101));
- receiveInterest(command);
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop",
+ makeParameters("hello", face::FACEID_NULL, 101));
+ receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
// check response
- BOOST_CHECK_EQUAL(checkResponse(0, command->getName(), ControlResponse(410, "Face not found")),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), ControlResponse(410, "Face not found")),
CheckResponseResult::OK);
// double check that the next hop was not added
@@ -181,14 +181,12 @@
Name expectedName;
ControlResponse expectedResponse;
auto testAddNextHop = [&] (ControlParameters parameters, const FaceId& faceId) {
- auto command = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters,
- [&faceId] (shared_ptr<Interest> interest) {
- interest->setTag(make_shared<lp::IncomingFaceIdTag>(faceId));
- });
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
+ req.setTag(make_shared<lp::IncomingFaceIdTag>(faceId));
m_responses.clear();
- expectedName = command->getName();
+ expectedName = req.getName();
expectedResponse = makeResponse(200, "Success", parameters.setFaceId(faceId));
- receiveInterest(command);
+ receiveInterest(req);
};
testAddNextHop(ControlParameters().setName("/hello").setCost(100).setFaceId(0), face1);
@@ -208,11 +206,11 @@
BOOST_REQUIRE_NE(addedFaceId, face::INVALID_FACEID);
auto parameters = makeParameters("hello", addedFaceId, 101);
- auto command = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
+ receiveInterest(req);
- receiveInterest(command);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, command->getName(), makeResponse(200, "Success", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "Success", parameters)),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(checkNextHop("/hello", 1, addedFaceId, 101), CheckNextHopResult::OK);
}
@@ -224,11 +222,11 @@
auto originalParameters = ControlParameters().setName("/hello").setFaceId(addedFaceId);
auto parameters = makeParameters("/hello", addedFaceId, 0);
- auto command = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", originalParameters);
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", originalParameters);
+ receiveInterest(req);
- receiveInterest(command);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, command->getName(), makeResponse(200, "Success", parameters)),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), makeResponse(200, "Success", parameters)),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(checkNextHop("/hello", 1, addedFaceId, 0), CheckNextHopResult::OK);
}
@@ -242,10 +240,10 @@
ControlResponse expectedResponse;
auto testAddNextHop = [&] (const ControlParameters& parameters) {
m_responses.clear();
- auto command = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
- expectedName = command->getName();
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/add-nexthop", parameters);
+ expectedName = req.getName();
expectedResponse = makeResponse(200, "Success", parameters);
- receiveInterest(command);
+ receiveInterest(req);
};
// add initial, succeeds
@@ -273,10 +271,10 @@
ControlResponse expectedResponse;
auto testRemoveNextHop = [&] (const ControlParameters& parameters) {
m_responses.clear();
- auto command = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
- expectedName = command->getName();
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
+ expectedName = req.getName();
expectedResponse = makeResponse(200, "Success", parameters);
- receiveInterest(command);
+ receiveInterest(req);
};
FaceId face1 = addFace();
@@ -313,12 +311,12 @@
BOOST_REQUIRE_NE(addedFaceId, face::INVALID_FACEID);
auto parameters = makeParameters("hello", addedFaceId);
- auto command = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
- auto response = makeResponse(200, "Success", parameters);
-
- receiveInterest(command);
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
+ receiveInterest(req);
BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_EQUAL(checkResponse(0, command->getName(), response), CheckResponseResult::OK);
+
+ auto expectedResponse = makeResponse(200, "Success", parameters);
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResponse), CheckResponseResult::OK);
}
BOOST_AUTO_TEST_CASE(ImplicitFaceId)
@@ -332,13 +330,11 @@
ControlResponse expectedResponse;
auto testWithImplicitFaceId = [&] (ControlParameters parameters, FaceId face) {
m_responses.clear();
- auto command = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters,
- [face] (shared_ptr<Interest> interest) {
- interest->setTag(make_shared<lp::IncomingFaceIdTag>(face));
- });
- expectedName = command->getName();
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
+ req.setTag(make_shared<lp::IncomingFaceIdTag>(face));
+ expectedName = req.getName();
expectedResponse = makeResponse(200, "Success", parameters.setFaceId(face));
- receiveInterest(command);
+ receiveInterest(req);
};
fib::Entry* entry = m_fib.insert("/hello").first;
@@ -367,10 +363,10 @@
ControlResponse expectedResponse;
auto testRemoveNextHop = [&] (ControlParameters parameters) {
m_responses.clear();
- auto command = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
- expectedName = command->getName();
+ auto req = makeControlCommandRequest("/localhost/nfd/fib/remove-nexthop", parameters);
+ expectedName = req.getName();
expectedResponse = makeResponse(200, "Success", parameters);
- receiveInterest(command);
+ receiveInterest(req);
};
m_fib.insert("/hello").first->addNextHop(*m_faceTable.get(face1), 101);
@@ -402,7 +398,7 @@
fibEntry->addNextHop(*m_faceTable.get(addFace()), std::numeric_limits<uint8_t>::max() - 2);
}
- receiveInterest(makeInterest("/localhost/nfd/fib/list"));
+ receiveInterest(Interest("/localhost/nfd/fib/list"));
Block content = concatenateResponses();
content.parse();
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index b9cade3..3b30b5c 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -70,9 +70,8 @@
// request
time::system_clock::TimePoint beforeRequest = time::system_clock::now();
- auto request = makeInterest("ndn:/localhost/nfd/status/general");
- request->setMustBeFresh(true);
- request->setChildSelector(1);
+ Interest request("/localhost/nfd/status/general");
+ request.setMustBeFresh(true).setChildSelector(1);
this->receiveInterest(request);
time::system_clock::TimePoint afterRequest = time::system_clock::now();
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.cpp b/tests/daemon/mgmt/nfd-manager-common-fixture.cpp
index 47a1655..f39e983 100644
--- a/tests/daemon/mgmt/nfd-manager-common-fixture.cpp
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -42,7 +42,7 @@
void
NfdManagerCommonFixture::setPrivilege(const std::string& privilege)
{
- this->saveIdentityCertificate(m_identityName, "ManagerCommonFixture.ndncert");
+ this->saveIdentityCertificate(DEFAULT_COMMAND_SIGNER_IDENTITY, "ManagerCommonFixture.ndncert");
const std::string& config = R"CONFIG(
authorizations
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 609fc5c..e0933e4 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -94,7 +94,7 @@
expectedResp.setCode(200)
.setText("OK")
.setBody(expectedParams.wireEncode());
- BOOST_CHECK_EQUAL(checkResponse(0, req->getName(), expectedResp),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(getInstanceName("/A"), strategyNameP);
@@ -114,7 +114,7 @@
ControlResponse expectedResp;
expectedResp.setCode(404)
.setText("Strategy not registered");
- BOOST_CHECK_EQUAL(checkResponse(0, req->getName(), expectedResp),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(hasEntry("/A"), false);
@@ -135,7 +135,7 @@
expectedResp.setCode(200)
.setText("OK")
.setBody(expectedParams.wireEncode());
- BOOST_CHECK_EQUAL(checkResponse(0, req->getName(), expectedResp),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(hasEntry("/A"), false);
@@ -153,7 +153,7 @@
expectedResp.setCode(200)
.setText("OK")
.setBody(expectedParams.wireEncode());
- BOOST_CHECK_EQUAL(checkResponse(0, req->getName(), expectedResp),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(hasEntry("/A"), false);
@@ -169,7 +169,7 @@
ControlResponse expectedResp;
expectedResp.setCode(400)
.setText("failed in validating parameters");
- BOOST_CHECK_EQUAL(checkResponse(0, req->getName(), expectedResp),
+ BOOST_CHECK_EQUAL(checkResponse(0, req.getName(), expectedResp),
CheckResponseResult::OK);
BOOST_CHECK_EQUAL(hasEntry("/"), true);
@@ -192,7 +192,7 @@
expected[name] = strategy;
}
- receiveInterest(makeInterest("/localhost/nfd/strategy-choice/list"));
+ receiveInterest(Interest("/localhost/nfd/strategy-choice/list"));
Block dataset = concatenateResponses();
dataset.parse();
BOOST_CHECK_EQUAL(dataset.elements_size(), expected.size());