ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n"));
}
+TEST_F(SmokeTest, RecoveryMode_ForDelta) {
+ bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.wgt";
+ bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+ RemoveAllRecoveryFiles();
+ ASSERT_EQ(Install(path_old, PackageType::WGT), ci::AppInstaller::Result::OK);
+ Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
+ backend_crash.Run("-i", path_new.string(), "-u", kTestUserIdStr.c_str());
+ ASSERT_NE(backend_crash.Wait(), 0);
+
+ std::string pkgid = "smokeapp30";
+ std::string appid = "smokeapp30.RecoveryModeForDelta";
+ bf::path recovery_file = FindRecoveryFile();
+ ASSERT_FALSE(recovery_file.empty());
+ ASSERT_EQ(Recover(recovery_file, PackageType::WGT),
+ ci::AppInstaller::Result::OK);
+ ValidatePackage(pkgid, {appid});
+
+ ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/wgt/VERSION", "1\n"));
+}
+
TEST_F(SmokeTest, InstallationMode_GoodSignature) {
bf::path path = kSmokePackagesDirectory / "InstallationMode_GoodSignature.wgt"; // NOLINT
ASSERT_EQ(Install(path, PackageType::WGT), ci::AppInstaller::Result::OK);