tests: Implement IdentityManagementV2Fixture for v2::KeyChain
The old IdentityManagementFixture is renamed to IdentityManagementV1Fixture.
This commit also removes global KeyChainFixture, as it doesn't work with
TestKeyChain test suites. Instead, IdentityManagementFixtures are
customizing PIB/TPM modules.
Change-Id: Iadc43b78523cd43bff4f454d6aea2fca8107a650
Refs: #2926
diff --git a/tests/unit-tests/mgmt/nfd/controller-fixture.hpp b/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
index 76e7bde..e3eb36f 100644
--- a/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
+++ b/tests/unit-tests/mgmt/nfd/controller-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -45,12 +45,8 @@
, datasetFailCallback(bind(&ControllerFixture::recordDatasetFail, this, _1, _2))
{
Name identityName("/localhost/ControllerFixture");
- if (this->addIdentity(identityName)) {
- m_keyChain.setDefaultIdentity(identityName);
- }
- else {
- BOOST_FAIL("cannot create identity");
- }
+ this->addIdentity(identityName);
+ m_keyChain.setDefaultIdentity(identityName);
}
/** \brief controls whether Controller's validator should accept or reject validation requests