From 8b98a437e05c3b8c6d905bdea5288716d9e1d382 Mon Sep 17 00:00:00 2001 From: Pawel Polawski Date: Sat, 27 Jul 2013 14:17:22 +0200 Subject: [PATCH] Tests for new security server permissions API [Issue#] SSDWSSP-155 [Bug/Feature] New API added to SS [Cause] New API has no tests [Solution] New tests added [Verification] Test number incresed by two new one Change-Id: I2bf27b7e99f3f10fd1e404cf7437a21b9199f477 --- .../security_server_tests_server.cpp | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/security-server-tests/security_server_tests_server.cpp b/tests/security-server-tests/security_server_tests_server.cpp index ed1bf1a..fedd864 100644 --- a/tests/security-server-tests/security_server_tests_server.cpp +++ b/tests/security-server-tests/security_server_tests_server.cpp @@ -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; -- 2.7.4