Remove cleardata feature from backend 03/106603/4 accepted/tizen/3.0/common/20161228.071514 accepted/tizen/3.0/ivi/20161226.030249 accepted/tizen/3.0/mobile/20161226.030107 accepted/tizen/3.0/tv/20161226.030157 accepted/tizen/3.0/wearable/20161226.030224 submit/tizen_3.0/20161223.043050
authorJunghyun Yeon <jungh.yeon@samsung.com>
Thu, 22 Dec 2016 07:15:54 +0000 (16:15 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 23 Dec 2016 00:23:16 +0000 (09:23 +0900)
- Cleardata will be handled by pkg_cleardata
so remove features reated with it

Related changes:
[pkgmgr-server] : https://review.tizen.org/gerrit/106486
[pkgmgr-tool] : https://review.tizen.org/gerrit/106485
[app-installers] : https://review.tizen.org/gerrit/105691
[wgt-backend] : https://review.tizen.org/gerrit/106601

Change-Id: Iaa0ebe8786a4910ff76422f0935089e55574ff82
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/tpk/tpk_installer.cc
src/unit_tests/smoke_test.cc
src/unit_tests/test_samples/smoke/ClearMode_Tpk.tpk [deleted file]

index 148504c52fae8e7e760099de7f79396962ca0c11..3c71f8c8cdbab6f287082e4bc89a94fc07f0fb9d 100644 (file)
@@ -16,7 +16,6 @@
 #include <common/step/filesystem/step_acquire_external_storage.h>
 #include <common/step/filesystem/step_optional_acquire_external_storage.h>
 #include <common/step/filesystem/step_change_ownership_and_permission.h>
-#include <common/step/filesystem/step_clear_data.h>
 #include <common/step/filesystem/step_copy.h>
 #include <common/step/filesystem/step_copy_storage_directories.h>
 #include <common/step/filesystem/step_copy_tep.h>
@@ -155,9 +154,6 @@ void TpkInstaller::Prepare() {
     case ci::RequestType::ReadonlyUpdateUninstall:
       ReadonlyUpdateUninstallSteps();
       break;
-    case ci::RequestType::Clear:
-      ClearSteps();
-      break;
     case ci::RequestType::EnablePkg:
       EnablePkgSteps();
       break;
@@ -619,14 +615,6 @@ void TpkInstaller::ReadonlyUpdateUninstallSteps() {
   AddStep<ci::pkgmgr::StepRemoveManifest>();
 }
 
-void TpkInstaller::ClearSteps() {
-  AddStep<ci::configuration::StepConfigure>(pkgmgr_);
-  AddStep<ci::configuration::StepParseManifest>(
-      ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
-      ci::configuration::StepParseManifest::StoreLocation::NORMAL);
-  AddStep<ci::filesystem::StepClearData>();
-}
-
 void TpkInstaller::DisablePkgSteps() {
   AddStep<ci::configuration::StepConfigure>(pkgmgr_);
   AddStep<ci::configuration::StepParseManifest>(
index 9dfaa38c067add3729f008b1e4519638ec7d90d1..01ff7a7f46d3f7dc001cbc2e20f2057d8e20be6a 100644 (file)
@@ -327,12 +327,6 @@ ci::AppInstaller::Result Uninstall(const std::string& pkgid,
   return CallBackend(SIZEOFARRAY(argv), argv, mode);
 }
 
-ci::AppInstaller::Result Clear(const bf::path& path,
-                                 RequestResult mode = RequestResult::NORMAL) {
-  const char* argv[] = {"", "-c", path.c_str(), "-u", kTestUserIdStr.c_str()};
-  return CallBackend(SIZEOFARRAY(argv), argv, mode);
-}
-
 ci::AppInstaller::Result EnablePackage(const std::string& path,
                                  RequestResult mode = RequestResult::NORMAL) {
   const char* argv[] = {"", "-A", path.c_str(), "-u", kTestUserIdStr.c_str()};
@@ -529,24 +523,6 @@ TEST_F(SmokeTest, DisablePkg) {
   ValidatePackageFS(pkgid, {appid});
 }
 
-TEST_F(SmokeTest, ClearMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "ClearMode_Tpk.tpk";
-  std::string pkgid = "smokeapp21";
-  std::string appid = "smokeapp21.ClearModeTpk";
-  ASSERT_EQ(Install(path), ci::AppInstaller::Result::OK);
-  bf::path root_path = ci::GetRootAppPath(false,
-      kTestUserId);
-  bs::error_code error;
-  bf::create_directory(root_path / pkgid / "data" / "dir", error);
-  ASSERT_FALSE(error);
-  ASSERT_TRUE(TouchFile(root_path / pkgid / "data" / "dir" / "file"));
-  ASSERT_TRUE(TouchFile(root_path / pkgid / "data" / "file"));
-  ASSERT_EQ(Clear(pkgid), ci::AppInstaller::Result::OK);
-  ValidatePackage(pkgid, {appid});
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "data" / "dir" / "file"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "file"));
-}
-
 TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
   bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
   RemoveAllRecoveryFiles();
diff --git a/src/unit_tests/test_samples/smoke/ClearMode_Tpk.tpk b/src/unit_tests/test_samples/smoke/ClearMode_Tpk.tpk
deleted file mode 100644 (file)
index d5aa730..0000000
Binary files a/src/unit_tests/test_samples/smoke/ClearMode_Tpk.tpk and /dev/null differ