ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n");
}
+TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
+ bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
+ bf::path delta_package = kSmokePackagesDirectory /
+ "DeltaMode_Tpk_Rollback.delta";
+ std::string pkgid = "smoketpk28";
+ std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
+ ASSERT_EQ(Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(Install(delta_package, RequestResult::FAIL),
+ ci::AppInstaller::Result::ERROR);
+ ValidatePackage(pkgid, appid);
+
+ // Check delta modifications
+ bf::path root_path = ci::GetRootAppPath(false, kTestUserId);
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
+ ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
+ ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
+ "basicdali.png"));
+ ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1\n");
+}
+
TEST_F(SmokeTest, ReinstallMode_Tpk) {
bf::path path = kSmokePackagesDirectory / "ReinstallMode_Tpk.tpk";
bf::path rds_directory = kSmokePackagesDirectory / "delta_dir";