Revert "Fix recovery test's failure" 60/218060/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 19 Nov 2019 04:54:34 +0000 (13:54 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Tue, 19 Nov 2019 06:38:10 +0000 (15:38 +0900)
This reverts commit c6435c86d25654408945b09f1ad48723b38aaa67.

PkgQuery should not be used directly.

Change-Id: Ie90b8087d092bdf6917e0ef7a48e674ab7f72c1f

src/unit_tests/recovery_test.cc

index 3df4a94b50ca8a31172e8d3737897154aab3cb20..9244606e3032cabc3aa2bbeb1c617981997068ec 100644 (file)
@@ -2,7 +2,6 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#include <common/pkgmgr_query.h>
 #include <common/utils/subprocess.h>
 #include <unit_tests/common/smoke_utils.h>
 
@@ -132,10 +131,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
-  std::string pkgid = "recoverypkg";
-
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-  ci::PkgQuery::Instance().GetResult(pkgid, params.test_user.uid, true);
 
   bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
   bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg2.tpk";
@@ -148,6 +144,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
   tpk_backend.Kill();
 
   if (tpk_backend.Wait() == 9) {
+    std::string pkgid = "recoverypkg";
     std::string appid = "recoverypkg";
     std::string exec = "recoverypkg";
     bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
@@ -166,10 +163,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForDelta) {
-  std::string pkgid = "recoverypkg";
-
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-  ci::PkgQuery::Instance().GetResult(pkgid, params.test_user.uid, true);
 
   bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
   bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg.delta";
@@ -182,6 +176,7 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
   tpk_backend.Kill();
 
   if (tpk_backend.Wait() == 9) {
+    std::string pkgid = "recoverypkg";
     std::string appid = "recoverypkg";
     std::string exec = "recoverypkg";
     bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
@@ -230,9 +225,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
-  std::string pkgid = "recoverypkg";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-  ci::PkgQuery::Instance().GetResult(pkgid, params.test_user.uid, true);
 
   bf::path path_old =
       kSmokePackagesDirectory / "RecoveryPkg.tpk";
@@ -247,6 +240,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
   tpk_backend.Kill();
 
   if (tpk_backend.Wait() == 9) {
+    std::string pkgid = "recoverypkg";
     std::string appid = "recoverypkg";
     std::string exec = "recoverypkg";
     bf::path recovery_file = FindRecoveryFile("/tpk-recovery",