EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
if (recovery_info->cleanup()) {
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
} else {
EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
}
bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForUpdate.wgt";
bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string pkgid = "smokewgt10";
std::string appid = "smokewgt10.RecoveryModeForUpdate";
AddDataFiles(pkgid, params.test_user.uid);
EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
std::string version = recovery_info->cleanup() ? "2\n" :"1\n";
EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
if (recovery_info->cleanup()) {
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_EQ(backend.Install(path_old),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
+ EXTENDED_ASSERT_EQ(backend.InstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
}
}
std::string pkgid = "smokewgt30";
std::string appid = "smokewgt30.RecoveryModeForDelta";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(BackendInterface::SubProcessResult::SUCCESS,
+ backend.InstallWithSubprocess(path_old));
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
std::vector<std::string> args =
EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
std::string contents = recovery_info->cleanup() ? "2\n" : "1\n";
EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
if (recovery_info->cleanup()) {
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_EQ(backend.Install(path_old),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
+ EXTENDED_ASSERT_EQ(backend.InstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
}
}
EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
ScopedTzipInterface interface(pkgid, params.test_user.uid);
if (recovery_info->cleanup()) {
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
} else {
EXTENDED_ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
}
std::string pkgid = "smokewgt32";
std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
std::vector<std::string> args =
EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
ScopedTzipInterface interface(pkgid, params.test_user.uid);
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
if (recovery_info->cleanup()) {
interface.Release();
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
- EXTENDED_ASSERT_EQ(backend.MountInstall(path_old),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
+ EXTENDED_ASSERT_EQ(backend.MountInstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
}
}
bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
std::string pkgid = "smokewgt07";
std::string appid = "smokewgt07.UpdateModeRollback";
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] =
bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Rollback.delta";
std::string pkgid = "smokewgt01";
std::string appid = "smokewgt01.DeltaMode";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] =
"UpdateMode_Rollback_Hybrid_2.wgt";
std::string pkgid = "smokehyb08";
std::string appid1 = "smokehyb08.web";
- ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] =
"DeltaMode_Rollback_Hybrid.delta";
std::string pkgid = "smokehyb11";
std::string appid1 = "smokehyb11.web";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-i", path.c_str(), "-u", test_user_str.c_str()};
"MountUpdateMode_Rollback_Hybrid_2.wgt";
std::string pkgid = "smokehyb10";
std::string appid1 = "smokehyb10.web";
- ASSERT_EQ(backend.MountInstall(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] =
kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
std::string pkgid = "smokewgt34";
std::string appid = "smokewgt34.web";
- ASSERT_EQ(backend.MountInstall(path_old),
- ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
std::string test_user_str = std::to_string(params.test_user.uid);
const char* argv[] =
bf::path path_new = kSmokePackagesDirectory /
"RecoveryMode_ForReadonlyUpdateInstall_2.wgt";
RemoveAllRecoveryFiles("/wgt-recovery", params.test_user.uid);
- ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallPreloadWithSubprocess(path_old),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string pkgid = "smokewgt51";
std::string appid = "smokewgt51.RecoveryModeForReadonlyUpdateInstall";
AddDataFiles(pkgid, params.test_user.uid);
EXTENDED_ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
- EXTENDED_ASSERT_EQ(backend.Recover(recovery_file),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.RecoverWithSubprocess(recovery_file),
+ BackendInterface::SubProcessResult::SUCCESS);
if (recovery_info->cleanup())
params.is_readonly = false;
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid}, params));
EXTENDED_ASSERT_TRUE(ValidateDataFiles(pkgid, params.test_user.uid));
if (recovery_info->cleanup()) {
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
AddDataFiles(pkgid, params.test_user.uid);
}
}