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/security/signature-sha256-with-rsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
index 494ea71..4944cbd 100644
--- a/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-rsa.t.cpp
@@ -110,7 +110,7 @@
BOOST_AUTO_TEST_CASE(DataSignature)
{
Name identityName("/SecurityTestSignatureSha256WithRsa/DataSignature");
- BOOST_REQUIRE(addIdentity(identityName, RsaKeyParams()));
+ addIdentity(identityName, RsaKeyParams());
shared_ptr<security::v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
m_keyChain.getDefaultKeyNameForIdentity(identityName)));
@@ -131,7 +131,7 @@
BOOST_AUTO_TEST_CASE(InterestSignature)
{
Name identityName("/SecurityTestSignatureSha256WithRsa/InterestSignature");
- BOOST_REQUIRE(addIdentity(identityName, RsaKeyParams()));
+ addIdentity(identityName, RsaKeyParams());
shared_ptr<security::v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
m_keyChain.getDefaultKeyNameForIdentity(identityName)));