Remove hints
Change-Id: I537619fefad6ffb6b46c5dc618f0fdcc15884d6e
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 820dbd2..c081103 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -53,7 +53,6 @@
public:
ndn::util::DummyClientFace face;
- Name hint;
const Name& zone;
Validator validator;
ndns::NameServer server;
@@ -63,7 +62,7 @@
BOOST_AUTO_TEST_CASE(NdnsQuery)
{
- Query q(hint, zone, ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(zone, ndns::label::NDNS_ITERATIVE_QUERY);
q.setRrLabel(Name("net"));
q.setRrType(ndns::label::NS_RR_TYPE);
@@ -75,7 +74,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP);
});
@@ -88,7 +87,7 @@
BOOST_AUTO_TEST_CASE(KeyQuery)
{
- Query q(hint, zone, ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(zone, ndns::label::NDNS_ITERATIVE_QUERY);
q.setQueryType(ndns::label::NDNS_CERT_QUERY);
q.setRrType(ndns::label::CERT_RR_TYPE);
@@ -101,7 +100,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_NACK);
});
@@ -115,7 +114,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RAW);
});
@@ -133,7 +132,7 @@
++nDataBack;
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RAW);
});
@@ -147,7 +146,7 @@
++nDataBack;
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_NACK);
});
@@ -172,7 +171,7 @@
shared_ptr<Data> data = re.toData();
m_keyChain.sign(*data, m_certName);
- Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
const Block& block = data->wireEncode();
Name name;
name.append(block);
@@ -188,7 +187,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
BOOST_CHECK_GT(resp.getRrs().size(), 0);
Block block = resp.getRrs()[0];
@@ -224,7 +223,7 @@
shared_ptr<Data> data = re.toData();
m_keyChain.sign(*data, m_certName);
- Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
const Block& block = data->wireEncode();
Name name;
name.append(block);
@@ -240,7 +239,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
BOOST_CHECK_GT(resp.getRrs().size(), 0);
Block block = resp.getRrs()[0];
@@ -300,7 +299,7 @@
shared_ptr<Data> data = re.toData();
m_keyChain.sign(*data, dskCert->getName());
- Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
const Block& block = data->wireEncode();
Name name;
name.append(block);
@@ -356,7 +355,6 @@
boost::asio::io_service io;
ndn::util::DummyClientFace face;
ndn::util::DummyClientFace validatorFace;
- Name hint;
const Name& zone;
Validator validator;
ndns::NameServer server;
@@ -403,7 +401,7 @@
shared_ptr<Data> data = re.toData();
m_keyChain.sign(*data, dskCert->getName());
- Query q(Name(hint), Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
+ Query q(Name(zone), ndns::label::NDNS_ITERATIVE_QUERY);
const Block& block = data->wireEncode();
Name name;
name.append(block);
@@ -428,7 +426,7 @@
BOOST_CHECK_EQUAL(data.getName().getPrefix(-1), q.toInterest().getName());
Response resp;
- BOOST_CHECK_NO_THROW(resp.fromData(hint, zone, data));
+ BOOST_CHECK_NO_THROW(resp.fromData(zone, data));
BOOST_CHECK_EQUAL(resp.getNdnsType(), NDNS_RESP); // by default NDNS_RAW is enough
BOOST_CHECK_GT(resp.getRrs().size(), 0);
Block block = resp.getRrs()[0];