Tests for new security server permissions API
authorPawel Polawski <p.polawski@partner.samsung.com>
Sat, 27 Jul 2013 12:17:22 +0000 (14:17 +0200)
committerMarcin Niesluchowski <m.niesluchow@samsung.com>
Thu, 23 Jan 2014 14:04:28 +0000 (15:04 +0100)
[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

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;