Tests for new security server permissions API
[platform/core/test/security-tests.git] / tests / security-server-tests / security_server_tests_server.cpp
index ed1bf1a..fedd864 100644 (file)
@@ -831,6 +831,29 @@ RUNNER_CHILD_TEST(tc08_check_API_data_share_denied)
     RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_ERROR_ACCESS_DENIED, "ret: " << ret);
 }
 
+RUNNER_CHILD_TEST(tc09_check_API_app_enable_permissions)
+{
+    int ret;
+    const char *app_id = "test_app";
+    app_type_t app_type = APP_TYPE_WGT;
+    const char *perm_list[] = {"aaa", "bbb", "ccc", NULL};
+    int persistent = 1;
+
+    ret = security_server_app_enable_permissions(app_id, app_type, perm_list, persistent);
+    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+}
+
+RUNNER_CHILD_TEST(tc10_check_API_app_disable_permissions)
+{
+    int ret;
+    const char *app_id = "test_app";
+    app_type_t app_type = APP_TYPE_WGT;
+    const char *perm_list[] = {"aaa", "bbb", "ccc", NULL};
+
+    ret = security_server_app_disable_permissions(app_id, app_type, perm_list);
+    RUNNER_ASSERT_MSG(ret == SECURITY_SERVER_API_SUCCESS, "ret: " << ret);
+}
+
 int main(int argc, char *argv[])
 {
     server_sockfd = -1;