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-ecdsa.t.cpp b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
index c54ee4c..7f20981 100644
--- a/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
+++ b/tests/unit-tests/security/signature-sha256-with-ecdsa.t.cpp
@@ -105,7 +105,7 @@
BOOST_AUTO_TEST_CASE(DataSignature)
{
Name identityName("/SecurityTestSignatureSha256WithEcdsa/DataSignature");
- BOOST_REQUIRE(addIdentity(identityName, EcdsaKeyParams()));
+ addIdentity(identityName, EcdsaKeyParams());
shared_ptr<security::v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
m_keyChain.getDefaultKeyNameForIdentity(identityName)));
@@ -126,7 +126,7 @@
BOOST_AUTO_TEST_CASE(InterestSignature)
{
Name identityName("/SecurityTestSignatureSha256WithEcdsa/InterestSignature");
- BOOST_REQUIRE(addIdentity(identityName, EcdsaKeyParams()));
+ addIdentity(identityName, EcdsaKeyParams());
shared_ptr<security::v1::PublicKey> publicKey;
BOOST_REQUIRE_NO_THROW(publicKey = m_keyChain.getPublicKeyFromTpm(
m_keyChain.getDefaultKeyNameForIdentity(identityName)));