tests: sync common testing infrastructure with ndn-cxx
Upgrade waf to version 2.0.21
Change-Id: I30615cc49416088e9c5e4d602fd11360c0ed9328
diff --git a/tests/unit/clients/iterative-query-controller.cpp b/tests/unit/clients/iterative-query-controller.t.cpp
similarity index 97%
rename from tests/unit/clients/iterative-query-controller.cpp
rename to tests/unit/clients/iterative-query-controller.t.cpp
index 46d11d4..6478156 100644
--- a/tests/unit/clients/iterative-query-controller.cpp
+++ b/tests/unit/clients/iterative-query-controller.t.cpp
@@ -20,9 +20,11 @@
#include "clients/iterative-query-controller.hpp"
#include "daemon/name-server.hpp"
-#include "test-common.hpp"
+#include "boost-test.hpp"
#include "unit/database-test-data.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
+
namespace ndn {
namespace ndns {
namespace tests {
@@ -128,7 +130,6 @@
}
}
}
-
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit/clients/query.cpp b/tests/unit/clients/query.t.cpp
similarity index 91%
rename from tests/unit/clients/query.cpp
rename to tests/unit/clients/query.t.cpp
index f7ed478..e4da482 100644
--- a/tests/unit/clients/query.cpp
+++ b/tests/unit/clients/query.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2017, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -19,10 +19,10 @@
#include "clients/query.hpp"
-#include "test-common.hpp"
+#include "boost-test.hpp"
+#include "key-chain-fixture.hpp"
#include <boost/lexical_cast.hpp>
-#include <string>
namespace ndn {
namespace ndns {
@@ -30,9 +30,9 @@
BOOST_AUTO_TEST_SUITE(Query)
-BOOST_FIXTURE_TEST_CASE(TestCase, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_CASE(TestCase, KeyChainFixture)
{
- security::Identity certIdentity = addIdentity("/cert/name");
+ auto certIdentity = m_keyChain.createIdentity("/cert/name");
Name zone("/net");
name::Component qType = ndns::label::NDNS_ITERATIVE_QUERY;
ndns::Query q(zone, qType);
@@ -77,7 +77,7 @@
BOOST_CHECK_EQUAL(q5.fromInterest(zone, interest), true);
BOOST_CHECK_EQUAL(q4, q5);
BOOST_CHECK_NE(q2, q4);
- }
+}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/unit/clients/response.cpp b/tests/unit/clients/response.t.cpp
similarity index 93%
rename from tests/unit/clients/response.cpp
rename to tests/unit/clients/response.t.cpp
index 88941c8..97a6fe0 100644
--- a/tests/unit/clients/response.cpp
+++ b/tests/unit/clients/response.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-2020, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -19,13 +19,14 @@
#include "clients/response.hpp"
-#include "test-common.hpp"
+#include "boost-test.hpp"
+#include "key-chain-fixture.hpp"
namespace ndn {
namespace ndns {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(Response, IdentityManagementFixture)
+BOOST_FIXTURE_TEST_SUITE(Response, KeyChainFixture)
BOOST_AUTO_TEST_CASE(Basic)
{