[UTC][app-manager][ACR-711][Fix TC about getting shared data]
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 1 Sep 2016 08:13:54 +0000 (17:13 +0900)
committerHawnkyu Jhun <h.jhun@samsung.com>
Thu, 1 Sep 2016 10:10:16 +0000 (19:10 +0900)
Change-Id: If3117bcb19fc56e23c531d5c61ae1478574fe007
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
13 files changed:
src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-arm.tpk [new file with mode: 0644]
src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-i386.tpk [new file with mode: 0644]
src/utc/app-manager/tct-app-manager-core_common_iot.h
src/utc/app-manager/tct-app-manager-core_mobile.h
src/utc/app-manager/tct-app-manager-core_tv.h
src/utc/app-manager/tct-app-manager-core_wearable.h
src/utc/app-manager/utc-app-manager.c

diff --git a/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-arm.tpk b/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..eacae86
Binary files /dev/null and b/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-arm.tpk differ
diff --git a/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-i386.tpk b/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..58bcb61
Binary files /dev/null and b/src/utc/app-manager/res/common_iot/org.tizen.shared_data-1.0.0-i386.tpk differ
diff --git a/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-arm.tpk b/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..eacae86
Binary files /dev/null and b/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-arm.tpk differ
diff --git a/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-i386.tpk b/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..58bcb61
Binary files /dev/null and b/src/utc/app-manager/res/mobile/org.tizen.shared_data-1.0.0-i386.tpk differ
diff --git a/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-arm.tpk b/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..eacae86
Binary files /dev/null and b/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-arm.tpk differ
diff --git a/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-i386.tpk b/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..58bcb61
Binary files /dev/null and b/src/utc/app-manager/res/tv/org.tizen.shared_data-1.0.0-i386.tpk differ
diff --git a/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-arm.tpk b/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-arm.tpk
new file mode 100644 (file)
index 0000000..eacae86
Binary files /dev/null and b/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-arm.tpk differ
diff --git a/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-i386.tpk b/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-i386.tpk
new file mode 100644 (file)
index 0000000..58bcb61
Binary files /dev/null and b/src/utc/app-manager/res/wearable/org.tizen.shared_data-1.0.0-i386.tpk differ
index b2a63a7..eca1274 100755 (executable)
@@ -51,6 +51,7 @@ extern int utc_app_manager_get_shared_data_path_p(void);
 extern int utc_app_manager_get_shared_data_path_n1(void);
 extern int utc_app_manager_get_shared_data_path_n2(void);
 extern int utc_app_manager_get_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_data_path_n4(void);
 extern int utc_app_manager_get_shared_resource_path_p(void);
 extern int utc_app_manager_get_shared_resource_path_n1(void);
 extern int utc_app_manager_get_shared_resource_path_n2(void);
@@ -189,6 +190,7 @@ testcase tc_array[] = {
     {"utc_app_manager_get_external_shared_data_path_n1", utc_app_manager_get_external_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_external_shared_data_path_n2", utc_app_manager_get_external_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_external_shared_data_path_n3", utc_app_manager_get_external_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_external_shared_data_path_n4", utc_app_manager_get_external_shared_data_path_n4, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_p", utc_app_manager_get_shared_data_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n1", utc_app_manager_get_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n2", utc_app_manager_get_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
index 311c1eb..870ef00 100755 (executable)
@@ -51,6 +51,7 @@ extern int utc_app_manager_get_shared_data_path_p(void);
 extern int utc_app_manager_get_shared_data_path_n1(void);
 extern int utc_app_manager_get_shared_data_path_n2(void);
 extern int utc_app_manager_get_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_data_path_n4(void);
 extern int utc_app_manager_get_shared_resource_path_p(void);
 extern int utc_app_manager_get_shared_resource_path_n1(void);
 extern int utc_app_manager_get_shared_resource_path_n2(void);
@@ -194,6 +195,7 @@ testcase tc_array[] = {
     {"utc_app_manager_get_shared_data_path_n1", utc_app_manager_get_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n2", utc_app_manager_get_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n3", utc_app_manager_get_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n4", utc_app_manager_get_shared_data_path_n4, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_p", utc_app_manager_get_shared_resource_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n1", utc_app_manager_get_shared_resource_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n2", utc_app_manager_get_shared_resource_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
index b2a63a7..8667877 100755 (executable)
@@ -51,6 +51,7 @@ extern int utc_app_manager_get_shared_data_path_p(void);
 extern int utc_app_manager_get_shared_data_path_n1(void);
 extern int utc_app_manager_get_shared_data_path_n2(void);
 extern int utc_app_manager_get_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_data_path_n4(void);
 extern int utc_app_manager_get_shared_resource_path_p(void);
 extern int utc_app_manager_get_shared_resource_path_n1(void);
 extern int utc_app_manager_get_shared_resource_path_n2(void);
@@ -193,6 +194,7 @@ testcase tc_array[] = {
     {"utc_app_manager_get_shared_data_path_n1", utc_app_manager_get_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n2", utc_app_manager_get_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n3", utc_app_manager_get_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n4", utc_app_manager_get_shared_data_path_n4, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_p", utc_app_manager_get_shared_resource_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n1", utc_app_manager_get_shared_resource_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n2", utc_app_manager_get_shared_resource_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
index b2a63a7..8667877 100755 (executable)
@@ -51,6 +51,7 @@ extern int utc_app_manager_get_shared_data_path_p(void);
 extern int utc_app_manager_get_shared_data_path_n1(void);
 extern int utc_app_manager_get_shared_data_path_n2(void);
 extern int utc_app_manager_get_shared_data_path_n3(void);
+extern int utc_app_manager_get_shared_data_path_n4(void);
 extern int utc_app_manager_get_shared_resource_path_p(void);
 extern int utc_app_manager_get_shared_resource_path_n1(void);
 extern int utc_app_manager_get_shared_resource_path_n2(void);
@@ -193,6 +194,7 @@ testcase tc_array[] = {
     {"utc_app_manager_get_shared_data_path_n1", utc_app_manager_get_shared_data_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n2", utc_app_manager_get_shared_data_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_data_path_n3", utc_app_manager_get_shared_data_path_n3, utc_app_manager_startup, utc_app_manager_cleanup},
+    {"utc_app_manager_get_shared_data_path_n4", utc_app_manager_get_shared_data_path_n4, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_p", utc_app_manager_get_shared_resource_path_p, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n1", utc_app_manager_get_shared_resource_path_n1, utc_app_manager_startup, utc_app_manager_cleanup},
     {"utc_app_manager_get_shared_resource_path_n2", utc_app_manager_get_shared_resource_path_n2, utc_app_manager_startup, utc_app_manager_cleanup},
index a049bd2..38f23ef 100755 (executable)
@@ -81,7 +81,7 @@ void utc_app_manager_startup(void)
                }
        }
 
-       TCT_UTCCheckInstalledApp(2, TEST_APPID, TEST_APPID2);
+       TCT_UTCCheckInstalledApp(3, TEST_APPID, TEST_APPID2, "org.tizen.shared_data");
 }
 
 /**
@@ -628,7 +628,6 @@ int utc_app_manager_get_external_shared_data_path_n3(void)
 }
 
 /**
- * @deprecated          Deprecated since 3.0.
  * @testcase           utc_app_manager_get_shared_data_path_p
  * @since_tizen                2.3
  * @description                Gets the absolute path to the shared data directory of the application specified with an application ID.
@@ -640,15 +639,15 @@ int utc_app_manager_get_shared_data_path_p(void)
        int ret = 0;
        char *path = NULL;
 
-       ret = app_manager_get_shared_data_path(TEST_APPID, &path);
+       ret = app_manager_get_shared_data_path("org.tizen.shared_data", &path);
        free(path);
-       assert_eq_with_exit(ret, APP_MANAGER_ERROR_NOT_SUPPORTED);
+       assert_eq_with_exit(ret, APP_MANAGER_ERROR_NONE);
        normal_exit(0);
 
        return 0;
 }
+
 /**
- * @deprecated          Deprecated since 3.0.
  * @testcase           utc_app_manager_get_shared_data_path_n1
  * @since_tizen                2.3
  * @description                If there is no path to return, func has to return an error.
@@ -667,7 +666,6 @@ int utc_app_manager_get_shared_data_path_n1(void)
 }
 
 /**
- * @deprecated          Deprecated since 3.0.
  * @testcase           utc_app_manager_get_shared_data_path_n2
  * @since_tizen                2.3
  * @description                If there is no an app id to find, func has to return an error.
@@ -687,7 +685,6 @@ int utc_app_manager_get_shared_data_path_n2(void)
 }
 
 /**
- * @deprecated          Deprecated since 3.0.
  * @testcase           utc_app_manager_get_shared_data_path_n3
  * @since_tizen                2.3
  * @description                If there is wrong an app id to find, func has to return an error.
@@ -707,6 +704,25 @@ int utc_app_manager_get_shared_data_path_n3(void)
 }
 
 /**
+ * @testcase           utc_app_manager_get_shared_data_path_n4
+ * @since_tizen                2.3
+ * @description                If the privilege is not declared, func has to return an error.
+ * @scenario           Call app_manager_get_shared_data_path func with an app id for test.\n
+ * Check whether result is APP_MANAGER_ERROR_NOT_SUPPORTED.
+ */
+int utc_app_manager_get_shared_data_path_n4(void)
+{
+       int ret;
+       char *path = NULL;
+
+       ret = app_manager_get_shared_data_path(TEST_APPID, &path);
+       assert_eq_with_exit(ret, APP_MANAGER_ERROR_NOT_SUPPORTED);
+       normal_exit(0);
+
+       return 0;
+}
+
+/**
  * @testcase           utc_app_manager_get_shared_resource_path_p
  * @since_tizen                2.3
  * @description                Gets the absolute path to the shared resource directory of the application specified with an application ID.