[AS-IS]
- If trust-anchor is never installed and uninstall API is called,
return FAILED-status error code.
[TO-BE]
- If trust-anchor is never installed and uninstall API is called,
notify to log as warning and process continue.
Change-Id: I2aff6aca3622dba4e7edaa811c5a735c3ffb67c4
Signed-off-by: sangwan.kwon <sangwan.kwon@samsung.com>
if (customBaseDir.exists())
customBaseDir.remove(true);
else if (!isRollback)
- throw std::invalid_argument("tanchor is never installed before.");
+ WARN(SINK, "tanchor is never installed before.");
DEBUG(SINK, "Success to deinit[" << this->m_customBasePath << "]");
}
TEST_EXPECT(true, ret == TRUST_ANCHOR_ERROR_NONE);
}
-TESTCASE(CAPI_TRUST_ANCHOR_UNINSTALL_NEGATIVE)
+TESTCASE(CAPI_TRUST_ANCHOR_UNINSTALL_POSITIVE_WARNING)
{
int ret = trust_anchor_uninstall(DUMMY_PKG_ID, DUMMY_UID);
- TEST_EXPECT(false, ret == TRUST_ANCHOR_ERROR_NONE);
+ TEST_EXPECT(true, ret == TRUST_ANCHOR_ERROR_NONE);
}
TEST_EXPECT(true, ret == TRUST_ANCHOR_ERROR_NONE);
}
-TESTCASE(TRUST_ANCHOR_UNINSTALL_NEGATIVE)
+TESTCASE(TRUST_ANCHOR_UNINSTALL_POSITIVE_WARNING)
{
tanchor::TrustAnchor ta(DUMMY_PKG_ID, DUMMY_UID);
int ret = ta.uninstall();
- TEST_EXPECT(false, ret == TRUST_ANCHOR_ERROR_NONE);
+ TEST_EXPECT(true, ret == TRUST_ANCHOR_ERROR_NONE);
}
TESTCASE(TRUST_ANCHOR_UNINSTALL_NO_ORIGINAL_CERTS)