face: Make default transport configurable
This commit also removes support for the ndnd-tlv-0.7
protocol's default socket location from UnixTransport.
Test HOME environment changing has also been centralized
into a single fixture (util/test-home-environment-fixture.hpp)
refs #2189
Change-Id: Iac1a6c88d7a2d9fcfb91a20356ac21b75daf7d17
diff --git a/tests/unit-tests/security/test-keychain.cpp b/tests/unit-tests/security/test-keychain.cpp
index dad7e75..bb3af0c 100644
--- a/tests/unit-tests/security/test-keychain.cpp
+++ b/tests/unit-tests/security/test-keychain.cpp
@@ -20,6 +20,7 @@
*/
#include "security/key-chain.hpp"
+#include "../util/test-home-environment-fixture.hpp"
#include <boost/filesystem.hpp>
#include "boost-test.hpp"
@@ -29,28 +30,7 @@
using std::vector;
-class KeychainConfigFileFixture
-{
-public:
- KeychainConfigFileFixture()
- {
- if (std::getenv("TEST_HOME"))
- m_HOME = std::getenv("TEST_HOME");
- }
-
- ~KeychainConfigFileFixture()
- {
- if (!m_HOME.empty())
- setenv("TEST_HOME", m_HOME.c_str(), 1);
- else
- unsetenv("TEST_HOME");
- }
-
-protected:
- std::string m_HOME;
-};
-
-BOOST_FIXTURE_TEST_SUITE(SecurityTestKeyChain, KeychainConfigFileFixture)
+BOOST_FIXTURE_TEST_SUITE(SecurityTestKeyChain, util::TestHomeEnvironmentFixture)
BOOST_AUTO_TEST_CASE(ConstructorNormalConfig)
{