tests: filename and test suite name corrections in pib and ping
This commit splits IdentityManagementFixture from IdentityManagementTimeFixture,
and copies its API from NFD repository.
refs #3018
Change-Id: I14dc66dd6eacc83ef2761c0c484173168d98dcef
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
new file mode 100644
index 0000000..01754ba
--- /dev/null
+++ b/tests/identity-management-fixture.cpp
@@ -0,0 +1,86 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016, Regents of the University of California.
+ *
+ * This file is part of ndn-tools (Named Data Networking Essential Tools).
+ * See AUTHORS.md for complete list of ndn-tools authors and contributors.
+ *
+ * ndn-tools is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "identity-management-fixture.hpp"
+#include <ndn-cxx/util/io.hpp>
+#include <boost/filesystem.hpp>
+
+namespace ndn {
+namespace tests {
+
+IdentityManagementFixture::IdentityManagementFixture()
+ : m_keyChainPath((boost::filesystem::path(TMP_TESTS_PATH) / "IdentityManagementFixture").string())
+ , m_keyChain("pib-sqlite3:" + m_keyChainPath, "tpm-file:" + m_keyChainPath)
+{
+}
+
+IdentityManagementFixture::~IdentityManagementFixture()
+{
+ for (const auto& id : m_identities) {
+ m_keyChain.deleteIdentity(id);
+ }
+
+ boost::system::error_code ec; // ignore error
+
+ boost::filesystem::remove_all(m_keyChainPath, ec);
+
+ for (const auto& certFile : m_certFiles) {
+ boost::filesystem::remove(certFile, ec);
+ }
+}
+
+bool
+IdentityManagementFixture::addIdentity(const Name& identity, const KeyParams& params)
+{
+ try {
+ m_keyChain.createIdentity(identity, params);
+ m_identities.push_back(identity);
+ return true;
+ }
+ catch (const std::runtime_error&) {
+ return false;
+ }
+}
+
+bool
+IdentityManagementFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd)
+{
+ shared_ptr<IdentityCertificate> cert;
+ try {
+ cert = m_keyChain.getCertificate(m_keyChain.getDefaultCertificateNameForIdentity(identity));
+ }
+ catch (const SecPublicInfo::Error&) {
+ if (wantAdd && this->addIdentity(identity)) {
+ return this->saveIdentityCertificate(identity, filename, false);
+ }
+ return false;
+ }
+
+ m_certFiles.push_back(filename);
+ try {
+ io::save(*cert, filename);
+ return true;
+ }
+ catch (const io::Error&) {
+ return false;
+ }
+}
+
+} // namespace tests
+} // namespace ndn
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
new file mode 100644
index 0000000..2d84fae
--- /dev/null
+++ b/tests/identity-management-fixture.hpp
@@ -0,0 +1,78 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2016, Regents of the University of California.
+ *
+ * This file is part of ndn-tools (Named Data Networking Essential Tools).
+ * See AUTHORS.md for complete list of ndn-tools authors and contributors.
+ *
+ * ndn-tools is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+#define NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
+
+#include "tests/test-common.hpp"
+#include <ndn-cxx/security/key-chain.hpp>
+#include <vector>
+
+namespace ndn {
+namespace tests {
+
+/** \brief a fixture that cleans up KeyChain identities and certificate files upon destruction
+ */
+class IdentityManagementFixture
+{
+public:
+ IdentityManagementFixture();
+
+ /** \brief deletes created identities and saved certificate files
+ */
+ ~IdentityManagementFixture();
+
+ /** \brief add identity
+ * \return whether successful
+ */
+ bool
+ addIdentity(const Name& identity, const KeyParams& params = KeyChain::DEFAULT_KEY_PARAMS);
+
+ /** \brief save identity certificate to a file
+ * \param identity identity name
+ * \param filename file name, should be writable
+ * \param wantAdd if true, add new identity when necessary
+ * \return whether successful
+ */
+ bool
+ saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd = false);
+
+private:
+ std::string m_keyChainPath;
+
+protected:
+ KeyChain m_keyChain;
+
+private:
+ std::vector<Name> m_identities;
+ std::vector<std::string> m_certFiles;
+};
+
+/** \brief convenience base class for inheriting from both UnitTestTimeFixture
+ * and IdentityManagementFixture
+ */
+class IdentityManagementTimeFixture : public UnitTestTimeFixture
+ , public IdentityManagementFixture
+{
+};
+
+} // namespace tests
+} // namespace ndn
+
+#endif // NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_FIXTURE_HPP
diff --git a/tests/identity-management-time-fixture.cpp b/tests/identity-management-time-fixture.cpp
deleted file mode 100644
index f3e7fa1..0000000
--- a/tests/identity-management-time-fixture.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015, Regents of the University of California.
- *
- * This file is part of ndn-tools (Named Data Networking Essential Tools).
- * See AUTHORS.md for complete list of ndn-tools authors and contributors.
- *
- * ndn-tools is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- *
- * @author Yingdi Yu <yingdi@cs.ucla.edu>
- */
-
-#include "identity-management-time-fixture.hpp"
-
-namespace ndn {
-namespace tests {
-
-IdentityManagementTimeFixture::IdentityManagementTimeFixture()
- : m_keyChainTmpPath(boost::filesystem::path(TMP_TESTS_PATH) / "PibIdMgmtTimeTest")
- , m_keyChain(std::string("pib-sqlite3:").append(m_keyChainTmpPath.string()),
- std::string("tpm-file:").append(m_keyChainTmpPath.string()))
-{
-}
-
-IdentityManagementTimeFixture::~IdentityManagementTimeFixture()
-{
- for (const auto& identity : m_identities) {
- m_keyChain.deleteIdentity(identity);
- }
-
- boost::filesystem::remove_all(m_keyChainTmpPath);
-}
-
-bool
-IdentityManagementTimeFixture::addIdentity(const Name& identity, const KeyParams& params)
-{
- try {
- m_keyChain.createIdentity(identity, params);
- m_identities.push_back(identity);
- return true;
- }
- catch (std::runtime_error&) {
- return false;
- }
-}
-
-
-} // namespace tests
-} // namespace ndn
diff --git a/tests/identity-management-time-fixture.hpp b/tests/identity-management-time-fixture.hpp
deleted file mode 100644
index 01d838a..0000000
--- a/tests/identity-management-time-fixture.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2015, Regents of the University of California.
- *
- * This file is part of ndn-tools (Named Data Networking Essential Tools).
- * See AUTHORS.md for complete list of ndn-tools authors and contributors.
- *
- * ndn-tools is free software: you can redistribute it and/or modify it under the terms
- * of the GNU General Public License as published by the Free Software Foundation,
- * either version 3 of the License, or (at your option) any later version.
- *
- * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- *
- * @author Yingdi Yu <yingdi@cs.ucla.edu>
- */
-
-#ifndef NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_TIME_FIXTURE_HPP
-#define NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_TIME_FIXTURE_HPP
-
-#include <ndn-cxx/security/key-chain.hpp>
-#include <vector>
-#include <boost/filesystem.hpp>
-
-#include "tests/test-common.hpp"
-
-namespace ndn {
-namespace tests {
-
-/**
- * @brief IdentityManagementTimeFixture is a test suite level fixture.
- * Test cases in the suite can use this fixture to create identities.
- * Identities added via addIdentity method are automatically deleted
- * during test teardown.
- */
-class IdentityManagementTimeFixture : public tests::UnitTestTimeFixture
-{
-public:
- IdentityManagementTimeFixture();
-
- ~IdentityManagementTimeFixture();
-
- /// @brief add identity, return true if succeed.
- bool
- addIdentity(const Name& identity, const KeyParams& params = KeyChain::DEFAULT_KEY_PARAMS);
-
-protected:
- boost::filesystem::path m_keyChainTmpPath;
-
- KeyChain m_keyChain;
- std::vector<Name> m_identities;
-};
-
-} // namespace tests
-} // namespace ndn
-
-#endif // NDN_TOOLS_TESTS_IDENTITY_MANAGEMENT_TIME_FIXTURE_HPP
diff --git a/tests/pib/cert-publicher.t.cpp b/tests/pib/cert-publisher.t.cpp
similarity index 94%
rename from tests/pib/cert-publicher.t.cpp
rename to tests/pib/cert-publisher.t.cpp
index ca71e4c..dfcfef6 100644
--- a/tests/pib/cert-publicher.t.cpp
+++ b/tests/pib/cert-publisher.t.cpp
@@ -20,13 +20,12 @@
*/
#include "tools/pib/cert-publisher.hpp"
-#include "../identity-management-time-fixture.hpp"
+
+#include "tests/identity-management-fixture.hpp"
+
#include <ndn-cxx/util/dummy-client-face.hpp>
-
#include <boost/filesystem.hpp>
-#include "tests/test-common.hpp"
-
namespace ndn {
namespace pib {
namespace tests {
@@ -52,7 +51,8 @@
util::DummyClientFace face;
};
-BOOST_FIXTURE_TEST_SUITE(PibCertPublisher, CertPublisherFixture)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_FIXTURE_TEST_SUITE(TestCertPublisher, CertPublisherFixture)
BOOST_AUTO_TEST_CASE(Basic)
{
@@ -125,7 +125,8 @@
BOOST_REQUIRE_EQUAL(face.sentData.size(), 0);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPibPublisher
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/pib/key-cache.t.cpp b/tests/pib/key-cache.t.cpp
index 0b88410..ab245c4 100644
--- a/tests/pib/key-cache.t.cpp
+++ b/tests/pib/key-cache.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -27,7 +27,8 @@
namespace pib {
namespace tests {
-BOOST_AUTO_TEST_SUITE(PibKeyCache)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_AUTO_TEST_SUITE(TestKeyCache)
BOOST_AUTO_TEST_CASE(Basic)
{
@@ -68,7 +69,8 @@
BOOST_CHECK(static_cast<bool>(keyCache.find(name4)));
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestKeyCache
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/pib/pib-db.t.cpp b/tests/pib/pib-db.t.cpp
index ac20f89..49e7e2c 100644
--- a/tests/pib/pib-db.t.cpp
+++ b/tests/pib/pib-db.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -20,12 +20,11 @@
*/
#include "tools/pib/pib-db.hpp"
-#include "../identity-management-time-fixture.hpp"
+
+#include "tests/identity-management-fixture.hpp"
#include <boost/filesystem.hpp>
-#include "tests/test-common.hpp"
-
namespace ndn {
namespace pib {
namespace tests {
@@ -54,7 +53,8 @@
};
-BOOST_FIXTURE_TEST_SUITE(PibPibDb, PibDbTestFixture)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_FIXTURE_TEST_SUITE(TestPibDb, PibDbTestFixture)
BOOST_AUTO_TEST_CASE(MgmtTest)
{
@@ -467,7 +467,8 @@
BOOST_CHECK_EQUAL(deletedIds[0], id1);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPibDb
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/pib/pib-validator.t.cpp b/tests/pib/pib-validator.t.cpp
index c00761b..dc83f2a 100644
--- a/tests/pib/pib-validator.t.cpp
+++ b/tests/pib/pib-validator.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -22,11 +22,11 @@
#include "tools/pib/pib-validator.hpp"
#include "tools/pib/encoding/update-param.hpp"
#include "tools/pib/encoding/delete-param.hpp"
-#include <ndn-cxx/security/key-chain.hpp>
-#include "../identity-management-time-fixture.hpp"
+#include "tests/identity-management-fixture.hpp"
+
+#include <ndn-cxx/security/key-chain.hpp>
#include <boost/filesystem.hpp>
-#include "tests/test-common.hpp"
namespace ndn {
namespace pib {
@@ -52,7 +52,8 @@
bool isProcessed;
};
-BOOST_FIXTURE_TEST_SUITE(PibPibValidator, PibValidatorFixture)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_FIXTURE_TEST_SUITE(TestPibValidator, PibValidatorFixture)
BOOST_AUTO_TEST_CASE(Basic)
{
@@ -130,7 +131,8 @@
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPibValidator
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/pib/pib.t.cpp b/tests/pib/pib.t.cpp
index f797d3c..8c9b920 100644
--- a/tests/pib/pib.t.cpp
+++ b/tests/pib/pib.t.cpp
@@ -20,16 +20,15 @@
*/
#include "tools/pib/pib.hpp"
-#include "../identity-management-time-fixture.hpp"
-#include <ndn-cxx/security/sec-tpm-file.hpp>
#include "tools/pib/encoding/pib-encoding.hpp"
+
+#include "tests/identity-management-fixture.hpp"
+
+#include <ndn-cxx/security/sec-tpm-file.hpp>
#include <ndn-cxx/util/io.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
-
#include <boost/filesystem.hpp>
-#include "tests/test-common.hpp"
-
namespace ndn {
namespace pib {
namespace tests {
@@ -75,7 +74,10 @@
util::DummyClientFace face;
};
-BOOST_FIXTURE_TEST_SUITE(PibPib, PibTestFixture)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_FIXTURE_TEST_SUITE(TestPib, PibTestFixture)
+
+using ndn::pib::Pib;
BOOST_AUTO_TEST_CASE(InitCertTest1)
{
@@ -1382,7 +1384,8 @@
BOOST_REQUIRE_EQUAL(face.sentData.size(), 0);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPib
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/pib/response-cache.t.cpp b/tests/pib/response-cache.t.cpp
index 782a9f2..0a6caaf 100644
--- a/tests/pib/response-cache.t.cpp
+++ b/tests/pib/response-cache.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California.
+ * Copyright (c) 2014-2016, Regents of the University of California.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -27,7 +27,8 @@
namespace pib {
namespace tests {
-BOOST_AUTO_TEST_SUITE(PibResponseCache)
+BOOST_AUTO_TEST_SUITE(Pib)
+BOOST_AUTO_TEST_SUITE(TestResponseCache)
BOOST_AUTO_TEST_CASE(Basic)
{
@@ -57,7 +58,8 @@
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestResponseCache
+BOOST_AUTO_TEST_SUITE_END() // Pib
} // namespace tests
} // namespace pib
diff --git a/tests/ping/client/ping.t.cpp b/tests/ping/client/ping.t.cpp
index e39c65a..2b20124 100644
--- a/tests/ping/client/ping.t.cpp
+++ b/tests/ping/client/ping.t.cpp
@@ -18,9 +18,9 @@
*/
#include "tools/ping/client/ping.hpp"
-#include <ndn-cxx/util/dummy-client-face.hpp>
#include "tests/test-common.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
namespace ndn {
namespace ping {
@@ -29,7 +29,10 @@
using namespace ndn::tests;
-BOOST_AUTO_TEST_SUITE(PingClientPing)
+BOOST_AUTO_TEST_SUITE(Ping)
+BOOST_AUTO_TEST_SUITE(TestPing)
+
+using ping::client::Ping;
BOOST_FIXTURE_TEST_CASE(Basic, UnitTestTimeFixture)
{
@@ -91,7 +94,8 @@
io.stop();
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPing
+BOOST_AUTO_TEST_SUITE_END() // Ping
} // namespace tests
} // namespace client
diff --git a/tests/ping/client/statistics-collector.t.cpp b/tests/ping/client/statistics-collector.t.cpp
index 6093785..6bcb9fb 100644
--- a/tests/ping/client/statistics-collector.t.cpp
+++ b/tests/ping/client/statistics-collector.t.cpp
@@ -18,9 +18,9 @@
*/
#include "tools/ping/client/statistics-collector.hpp"
-#include <ndn-cxx/util/dummy-client-face.hpp>
#include "tests/test-common.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
namespace ndn {
namespace ping {
@@ -62,7 +62,8 @@
StatisticsCollector sc;
};
-BOOST_FIXTURE_TEST_SUITE(PingClientStatisticsCollector, StatisticsCollectorFixture)
+BOOST_AUTO_TEST_SUITE(Ping)
+BOOST_FIXTURE_TEST_SUITE(TestStatisticsCollector, StatisticsCollectorFixture)
BOOST_AUTO_TEST_CASE(Resp50msResp50ms)
{
@@ -184,7 +185,8 @@
BOOST_CHECK_CLOSE(stats.packetLossRate, 0.5, 0.001);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestStatisticsCollector
+BOOST_AUTO_TEST_SUITE_END() // Ping
} // namespace tests
} // namespace client
diff --git a/tests/ping/integrated.t.cpp b/tests/ping/integrated.t.cpp
index fb6f1cc..9e929aa 100644
--- a/tests/ping/integrated.t.cpp
+++ b/tests/ping/integrated.t.cpp
@@ -19,10 +19,9 @@
#include "tools/ping/server/ping-server.hpp"
#include "tools/ping/client/ping.hpp"
-#include <ndn-cxx/util/dummy-client-face.hpp>
-#include "tests/test-common.hpp"
-#include "../identity-management-time-fixture.hpp"
+#include "tests/identity-management-fixture.hpp"
+#include <ndn-cxx/util/dummy-client-face.hpp>
namespace ndn {
namespace ping {
@@ -68,7 +67,8 @@
bool wantLoss;
};
-BOOST_AUTO_TEST_SUITE(PingIntegrated)
+BOOST_AUTO_TEST_SUITE(Ping)
+BOOST_AUTO_TEST_SUITE(TestIntegrated)
BOOST_FIXTURE_TEST_CASE(Normal, PingIntegratedFixture)
{
@@ -134,7 +134,8 @@
BOOST_REQUIRE_EQUAL(0, server->getNPings());
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestIntegrated
+BOOST_AUTO_TEST_SUITE_END() // Ping
} // namespace tests
} // namespace ping
diff --git a/tests/ping/server/ping-server.t.cpp b/tests/ping/server/ping-server.t.cpp
index 7d2a8da..0192008 100644
--- a/tests/ping/server/ping-server.t.cpp
+++ b/tests/ping/server/ping-server.t.cpp
@@ -21,7 +21,7 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
#include "tests/test-common.hpp"
-#include "../../identity-management-time-fixture.hpp"
+#include "../../identity-management-fixture.hpp"
namespace ndn {
namespace ping {
@@ -30,7 +30,8 @@
using namespace ndn::tests;
-BOOST_AUTO_TEST_SUITE(PingServerPingServer)
+BOOST_AUTO_TEST_SUITE(Ping)
+BOOST_AUTO_TEST_SUITE(TestPingServer)
class CreatePingServerFixture : public IdentityManagementTimeFixture
{
@@ -89,7 +90,8 @@
BOOST_REQUIRE_EQUAL(2, pingServer.getNPings());
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestPingServer
+BOOST_AUTO_TEST_SUITE_END() // Ping
} // namespace tests
} // namespace server