Constrain the generated key type in testing

[ Merge of http://go/wvgerrit/148157 ]

Fail the test if the returned type is other values.

Bug: 224375138
Test: GtsMediaDrmTests
Change-Id: I4abad9d69865cac99654d3dedd443463dd728a58
This commit is contained in:
Rahul Frias
2022-03-21 14:41:01 -07:00
parent a6a99c416f
commit b07523f4c6

View File

@@ -1340,6 +1340,8 @@ TEST_F(OEMCryptoProv40Test, GenerateCertificateKeyPairSuccess) {
} else if (key_type == OEMCrypto_PrivateKeyType::OEMCrypto_ECC_Private_Key) {
ASSERT_NO_FATAL_FAILURE(
s.SetEcPublicKey(public_key.data(), public_key_size));
} else {
FAIL() << "Unknown private key type: " << static_cast<int>(key_type);
}
}