Add test case for global service app 23/228723/4
authorIlho Kim <ilho159.kim@samsung.com>
Wed, 25 Mar 2020 05:49:41 +0000 (14:49 +0900)
committerilho kim <ilho159.kim@samsung.com>
Fri, 3 Apr 2020 06:15:24 +0000 (06:15 +0000)
Added tests:
 InstallationMode_GlobalServiceAppWithUiAppId : Test to install of global type service app that has ui applicaion's id
 InstallationMode_GlobalServiceAppWithoutUiAppId : Test to install of global type service app that has not ui applicaion's id
 InstallationMode_UIServiceAppWithUiAppId : Test to install of ui type service app that has ui applicaion's id
 InstallationMode_UIServiceAppWithoutUiAppId : Test to install of ui type service app that has not ui applicaion's id
 InstallationMode_UIAppWithoutUiAppId : Test to install of ui application that has not application's id

Relate:
 [wgt-backend]https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-backend/+/226781/

Change-Id: Id8c1c206ec4ab82a390c5dda15ada5a975d72c73
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/unit_tests/smoke_test.cc
src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithUiAppId.wgt [new file with mode: 0644]
src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithoutUiAppId.wgt [new file with mode: 0644]
src/unit_tests/test_samples/smoke/InstallationMode_UIAppWithoutUiAppId.wgt [new file with mode: 0644]
src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithUiAppId.wgt [new file with mode: 0644]
src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithoutUiAppId.wgt [new file with mode: 0644]

index 581908a..53fc9eb 100644 (file)
@@ -885,6 +885,49 @@ TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
   ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
 }
 
+TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithUiAppId) {
+  bf::path path = kSmokePackagesDirectory /
+      "InstallationMode_GlobalServiceAppWithUiAppId.wgt";
+  std::string pkgid = "smokewgt46";
+  std::string ui_appid = "smokewgt46.uiapp";
+  std::string service_appid = "smokewgt46.serviceapp";
+  ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+  ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_GlobalServiceAppWithoutUiAppId) {
+  bf::path path = kSmokePackagesDirectory /
+      "InstallationMode_GlobalServiceAppWithoutUiAppId.wgt";
+  std::string pkgid = "smokewgt47";
+  std::string service_appid = "smokewgt47.serviceapp";
+  ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+  ASSERT_TRUE(ValidatePackage(pkgid, {service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_UIServiceAppWithUiAppId) {
+  bf::path path = kSmokePackagesDirectory /
+      "InstallationMode_UIServiceAppWithUiAppId.wgt";
+  std::string pkgid = "smokewgt48";
+  std::string ui_appid = "smokewgt48.uiapp";
+  std::string service_appid = "smokewgt48.serviceapp";
+  ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+  ASSERT_TRUE(ValidatePackage(pkgid, {ui_appid, service_appid}, params));
+}
+
+TEST_F(SmokeTest, InstallationMode_UIServiceAppWithoutUiAppId) {
+  bf::path path = kSmokePackagesDirectory /
+      "InstallationMode_UIServiceAppWithoutUiAppId.wgt";
+  std::string pkgid = "smokewgt49";
+  ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+}
+
+TEST_F(SmokeTest, InstallationMode_UIAppWithoutUiAppId) {
+  bf::path path = kSmokePackagesDirectory /
+      "InstallationMode_UIAppWithoutUiAppId.wgt";
+  std::string pkgid = "smokewgt50";
+  ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::ERROR);
+}
+
 }  // namespace smoke_test
 
 int main(int argc,  char** argv) {
diff --git a/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithUiAppId.wgt b/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithUiAppId.wgt
new file mode 100644 (file)
index 0000000..85ac7de
Binary files /dev/null and b/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithUiAppId.wgt differ
diff --git a/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithoutUiAppId.wgt b/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithoutUiAppId.wgt
new file mode 100644 (file)
index 0000000..e6b23b8
Binary files /dev/null and b/src/unit_tests/test_samples/smoke/InstallationMode_GlobalServiceAppWithoutUiAppId.wgt differ
diff --git a/src/unit_tests/test_samples/smoke/InstallationMode_UIAppWithoutUiAppId.wgt b/src/unit_tests/test_samples/smoke/InstallationMode_UIAppWithoutUiAppId.wgt
new file mode 100644 (file)
index 0000000..3b3c3f8
Binary files /dev/null and b/src/unit_tests/test_samples/smoke/InstallationMode_UIAppWithoutUiAppId.wgt differ
diff --git a/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithUiAppId.wgt b/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithUiAppId.wgt
new file mode 100644 (file)
index 0000000..80ff449
Binary files /dev/null and b/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithUiAppId.wgt differ
diff --git a/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithoutUiAppId.wgt b/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithoutUiAppId.wgt
new file mode 100644 (file)
index 0000000..f3d4872
Binary files /dev/null and b/src/unit_tests/test_samples/smoke/InstallationMode_UIServiceAppWithoutUiAppId.wgt differ