Add comparing package attributes for ReadonlyUpdateUninstall test 13/203613/3
authorSangyoon Jang <jeremy.jang@samsung.com>
Tue, 16 Apr 2019 07:56:31 +0000 (16:56 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 30 May 2019 01:58:47 +0000 (01:58 +0000)
Requires:
 - https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/203612

Change-Id: I8f1def6d86993b411c856bc1dd168d134cb7d149
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
src/unit_tests/smoke_test.cc

index d252a9b..1129003 100644 (file)
@@ -695,12 +695,17 @@ TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
   std::string exec = "basicui";
 
   ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
+  ci::PkgQueryInterface pkg_query1(pkgid, params.test_user.uid);
+  PackageAttributes original(pkg_query1);
   ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
   ValidatePackage(pkgid, {appid, exec}, params);
   TestParameters nonreadonly_params(params);
   nonreadonly_params.is_readonly = false;
   ValidatePackage(pkgid, {appid, exec}, nonreadonly_params);
   ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
+  ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
+  PackageAttributes restored(pkg_query2);
+  ASSERT_EQ(original, restored);
   ValidatePackage(pkgid, {appid, exec}, params);
 }