Refactoring - smoke tests 46/112146/3
authorDamian Pietruchowski <d.pietruchow@samsung.com>
Thu, 26 Jan 2017 10:05:26 +0000 (11:05 +0100)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Mon, 6 Feb 2017 12:21:49 +0000 (04:21 -0800)
Change-Id: I2097bc121d475b096884724ac184d6138bed4236
Signed-off-by: Damian Pietruchowski <d.pietruchow@samsung.com>
src/unit_tests/smoke_test.cc

index 7a2aabf..a227f6f 100644 (file)
@@ -572,17 +572,7 @@ ci::AppInstaller::Result Recover(const bf::path& recovery_file,
                                  RequestResult mode = RequestResult::NORMAL) {
   const char* argv[] = {"", "-b", recovery_file.c_str(), "-u",
                         kTestUserIdStr.c_str()};
-  TestPkgmgrInstaller pkgmgr_installer;
-  std::unique_ptr<ci::AppQueryInterface> query_interface =
-      CreateQueryInterface();
-  auto pkgmgr =
-      ci::PkgMgrInterface::Create(SIZEOFARRAY(argv), const_cast<char**>(argv),
-                                  &pkgmgr_installer, query_interface.get());
-  if (!pkgmgr) {
-    LOG(ERROR) << "Failed to initialize pkgmgr interface";
-    return ci::AppInstaller::Result::UNKNOWN;
-  }
-  return RunInstallerWithPkgrmgr(pkgmgr, type, mode);
+  return CallBackend(SIZEOFARRAY(argv), argv, type, mode);
 }
 
 void BackupPath(const bf::path& path) {