std::string pkgid = "smoketpk28";
std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
std::string exec = "basicdali";
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] =
{"", "-i", delta_package.c_str(), "-u", test_uid_str.c_str()};
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, exec}, 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_Tpk_Update.tpk";
bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
RemoveAllRecoveryFiles("/tpk-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 test_uid_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, exec}, params));
std::string version = recovery_info->cleanup() ? "2" : "1";
EXTENDED_ASSERT_TRUE(
ValidateFileContentInPackage(pkgid, "res/VERSION", version, params));
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);
}
}
return true;
TEST_F(SmokeTest, TEP_Tpk_TepInstallTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(5)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEPWithSubprocess(path, tep1),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
"-e", tep1.c_str()};
TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(6)
- ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithSubprocess(path),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str(),
"-e", tep1.c_str()};
TEST_F(SmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(7)
- ASSERT_EQ(backend.InstallWithTEP(path, tep1), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.InstallWithTEPWithSubprocess(path, tep1),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(12)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEPWithSubprocess(path, tep1),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
"-e", tep2.c_str()};
TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(13)
- ASSERT_EQ(backend.MountInstall(path), ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithSubprocess(path),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-w", path.c_str(), "-u", test_uid_str.c_str(),
"-e", tep1.c_str()};
TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
TEP_TEST_STARTING_BLOCK(14)
- ASSERT_EQ(backend.MountInstallWithTEP(path, tep1),
- ci::AppInstaller::Result::OK);
+ ASSERT_EQ(backend.MountInstallWithTEPWithSubprocess(path, tep1),
+ BackendInterface::SubProcessResult::SUCCESS);
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
backend.TestRollbackAfterEachStep(SIZEOFARRAY(argv), argv, [&]() -> bool {
bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
+ ASSERT_EQ(BackendInterface::SubProcessResult::SUCCESS,
+ backend.InstallWithSubprocess(path_old));
std::string test_uid_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, exec}, params));
std::string contents = recovery_info->cleanup() ?
"version 2" : "version 1";
if (recovery_info->cleanup()) {
EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/DELETED"));
EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/ADDED"));
- 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);
} else {
EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
std::string pkgid = "smoketpk36";
std::string appid = "smoketpk36.UpdateMode_Rollback";
std::string exec = "smoketpk36";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(old_path));
+ ASSERT_EQ(BackendInterface::SubProcessResult::SUCCESS,
+ backend.InstallWithSubprocess(old_path));
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] =
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, exec}, 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_new =
kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
+ ASSERT_EQ(BackendInterface::SubProcessResult::SUCCESS,
+ backend.MountInstallWithSubprocess(path_old));
std::string test_uid_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, exec}, params));
std::string version = recovery_info->cleanup() ? "2" : "1";
"res/VERSION", version, params));
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);
}
}
return true;
std::string pkgid = "smoketpk40";
std::string appid = "smoketpk40.MountUpdateMode_Rollback";
std::string exec = "smoketpk40";
- ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(old_path));
+ ASSERT_EQ(BackendInterface::SubProcessResult::SUCCESS,
+ backend.MountInstallWithSubprocess(old_path));
std::string test_uid_str = std::to_string(params.test_user.uid);
const char* argv[] =
{"", "-w", new_path.c_str(), "-u", test_uid_str.c_str()};
bf::path path_new = kSmokePackagesDirectory /
"RecoveryMode_ForReadonlyUpdateInstall_2.tpk";
RemoveAllRecoveryFiles("/tpk-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 test_uid_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);
if (recovery_info->cleanup())
params.is_readonly = false;
EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
EXTENDED_ASSERT_TRUE(
ValidateFileContentInPackage(pkgid, "res/VERSION", version, params));
if (recovery_info->cleanup()) {
- EXTENDED_ASSERT_EQ(backend.Uninstall(pkgid),
- ci::AppInstaller::Result::OK);
+ EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
+ BackendInterface::SubProcessResult::SUCCESS);
}
}
return true;
bf::path path_new = kSmokePackagesDirectory
/ "RecoveryMode_AddResControl_2.tpk";
RemoveAllRecoveryFiles("/tpk-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 = "smoketpk50";
std::string appid = "smoketpk50.RecoveryMode_AddResControl";
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, exec}, params));
bool dir_exists = recovery_info->cleanup();
EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/allowed"),
dir_exists);
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);
}
}
return true;
bf::path path_new = kSmokePackagesDirectory
/ "RecoveryMode_RemoveResControl_2.tpk";
RemoveAllRecoveryFiles("/tpk-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 = "smoketpk51";
std::string appid = "smoketpk51.RecoveryMode_RemoveResControl";
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, exec}, params));
bool dir_exists = !recovery_info->cleanup();
EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/allowed"),
dir_exists);
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);
}
}
return true;