From: Sangyoon Jang Date: Thu, 4 Jun 2020 08:58:38 +0000 (+0900) Subject: Validate file contents which are located at extracted dir X-Git-Tag: submit/tizen/20200612.081636~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=161f18ab8e003ba9e12c98597e520fb99f872a10;p=platform%2Fcore%2Fappfw%2Ftpk-backend.git Validate file contents which are located at extracted dir When the package mount installed, some contents of package will be extracted at package directory, because someone needs those files without mounting zip file. The test needs to validate those files recovered or rollbacked well or not. Change-Id: Id72749b4cf5852f22bec30eaf3b52c157e13bc5d Signed-off-by: Sangyoon Jang --- diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index e6f9bc6..a00ffd6 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -656,6 +656,8 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) { ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params)); ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params)); + ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1", + params)); ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true); std::string version_recovered = pkg_query2.Version(); ASSERT_TRUE(version_old == version_recovered); @@ -685,6 +687,8 @@ TEST_F(RollbackSmokeTest, MountUpdateMode) { ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params)); ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params)); + ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1", + params)); ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true); std::string version_rollbacked = pkg_query2.Version(); ASSERT_TRUE(version_old == version_rollbacked); diff --git a/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback.tpk b/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback.tpk index 9cbf1c0..6586b51 100644 Binary files a/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback.tpk and b/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback.tpk differ diff --git a/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback2.tpk b/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback2.tpk index 2c35dfa..b8cb1f1 100644 Binary files a/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback2.tpk and b/src/unit_tests/test_samples/smoke/MountUpdateMode_Rollback2.tpk differ diff --git a/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate.tpk b/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate.tpk index 4b88c72..b7f13cb 100644 Binary files a/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate.tpk and b/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate.tpk differ diff --git a/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate2.tpk b/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate2.tpk index e5e525d..ef80686 100644 Binary files a/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate2.tpk and b/src/unit_tests/test_samples/smoke/RecoveryMode_ForMountUpdate2.tpk differ