class SmokeTest : public testing::Test {
};
-// TODO(b.kunikowski): New smoke app pkgid name convention.
-// Change all smokeapp pkgids to smokewgt, because now there
-// may be some smoke app pkgid identical as in tpk smoke tests, and this may
-// cause bad results of some smoke tests.
-
TEST_F(SmokeTest, InstallationMode) {
bf::path path = kSmokePackagesDirectory / "InstallationMode.wgt";
- std::string pkgid = "smokeapp03";
- std::string appid = "smokeapp03.InstallationMode";
+ std::string pkgid = "smokewgt03";
+ std::string appid = "smokewgt03.InstallationMode";
ASSERT_EQ(Install(path, PackageType::WGT), ci::AppInstaller::Result::OK);
ValidatePackage(pkgid, {appid});
}
TEST_F(SmokeTest, UpdateMode) {
bf::path path_old = kSmokePackagesDirectory / "UpdateMode.wgt";
bf::path path_new = kSmokePackagesDirectory / "UpdateMode_2.wgt";
- std::string pkgid = "smokeapp04";
- std::string appid = "smokeapp04.UpdateMode";
+ std::string pkgid = "smokewgt04";
+ std::string appid = "smokewgt04.UpdateMode";
ASSERT_EQ(Install(path_old, PackageType::WGT), ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, kTestUserId);
ASSERT_EQ(Install(path_new, PackageType::WGT), ci::AppInstaller::Result::OK);
TEST_F(SmokeTest, DeinstallationMode) {
bf::path path = kSmokePackagesDirectory / "DeinstallationMode.wgt";
- std::string pkgid = "smokeapp05";
- std::string appid = "smokeapp05.DeinstallationMode";
+ std::string pkgid = "smokewgt05";
+ std::string appid = "smokewgt05.DeinstallationMode";
ASSERT_EQ(Install(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ASSERT_EQ(Uninstall(pkgid, PackageType::WGT, false),
TEST_F(SmokeTest, RDSMode) {
bf::path path = kSmokePackagesDirectory / "RDSMode.wgt";
- std::string pkgid = "smokeapp11";
- std::string appid = "smokeapp11.RDSMode";
+ std::string pkgid = "smokewgt11";
+ std::string appid = "smokewgt11.RDSMode";
bf::path delta_directory = kSmokePackagesDirectory / "delta_dir/";
bf::path sdk_expected_directory =
bf::path(ci::GetRootAppPath(false, kTestUserId)) / "tmp" / pkgid;
TEST_F(SmokeTest, EnablePkg) {
bf::path path = kSmokePackagesDirectory / "EnablePkg.wgt";
- std::string pkgid = "smokeapp22";
+ std::string pkgid = "smokewgt22";
ASSERT_EQ(Install(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ASSERT_EQ(DisablePackage(pkgid, PackageType::WGT),
TEST_F(SmokeTest, DisablePkg) {
bf::path path = kSmokePackagesDirectory / "DisablePkg.wgt";
- std::string pkgid = "smokeapp21";
- std::string appid = "smokeapp21.DisablePkg";
+ std::string pkgid = "smokewgt21";
+ std::string appid = "smokewgt21.DisablePkg";
ASSERT_EQ(Install(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ASSERT_EQ(DisablePackage(pkgid, PackageType::WGT),
TEST_F(SmokeTest, DeltaMode) {
bf::path path = kSmokePackagesDirectory / "DeltaMode.wgt";
bf::path delta_package = kSmokePackagesDirectory / "DeltaMode.delta";
- std::string pkgid = "smokeapp17";
- std::string appid = "smokeapp17.DeltaMode";
+ std::string pkgid = "smokewgt17";
+ std::string appid = "smokewgt17.DeltaMode";
ASSERT_EQ(DeltaInstall(path, delta_package, PackageType::WGT),
ci::AppInstaller::Result::OK);
ValidatePackage(pkgid, {appid});
backend_crash.Run("-i", path.string(), "-u", kTestUserIdStr.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
- std::string pkgid = "smokeapp09";
- std::string appid = "smokeapp09.RecoveryModeForInstallation";
+ std::string pkgid = "smokewgt09";
+ std::string appid = "smokewgt09.RecoveryModeForInstallation";
bf::path recovery_file = FindRecoveryFile();
ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(Recover(recovery_file, PackageType::WGT),
bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForUpdate_2.wgt";
RemoveAllRecoveryFiles();
ASSERT_EQ(Install(path_old, PackageType::WGT), ci::AppInstaller::Result::OK);
- std::string pkgid = "smokeapp10";
- std::string appid = "smokeapp10.RecoveryModeForUpdate";
+ std::string pkgid = "smokewgt10";
+ std::string appid = "smokewgt10.RecoveryModeForUpdate";
AddDataFiles(pkgid, kTestUserId);
Subprocess backend_crash("/usr/bin/wgt-backend-ut/smoke-test-helper");
backend_crash.Run("-i", path_new.string(), "-u", kTestUserIdStr.c_str());
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";
+ std::string pkgid = "smokewgt30";
+ std::string appid = "smokewgt30.RecoveryModeForDelta";
bf::path recovery_file = FindRecoveryFile();
ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(Recover(recovery_file, PackageType::WGT),
backend_crash.Run("-w", path.string(), "-u", kTestUserIdStr.c_str());
ASSERT_NE(backend_crash.Wait(), 0);
- std::string pkgid = "smokeapp31";
- std::string appid = "smokeapp31.RecoveryModeForMountInstall";
+ std::string pkgid = "smokewgt31";
+ std::string appid = "smokewgt31.RecoveryModeForMountInstall";
bf::path recovery_file = FindRecoveryFile();
ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(Recover(recovery_file, PackageType::WGT),
kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.wgt";
bf::path path_new =
kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate_2.wgt";
- std::string pkgid = "smokeapp32";
- std::string appid = "smokeapp32.RecoveryModeForMountUpdate";
+ std::string pkgid = "smokewgt32";
+ std::string appid = "smokewgt32.RecoveryModeForMountUpdate";
RemoveAllRecoveryFiles();
ASSERT_EQ(MountInstall(path_old, PackageType::WGT),
ci::AppInstaller::Result::OK);
TEST_F(SmokeTest, InstallationMode_Rollback) {
bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.wgt";
- std::string pkgid = "smokeapp06";
- std::string appid = "smokeapp06.InstallationModeRollback";
+ std::string pkgid = "smokewgt06";
+ std::string appid = "smokewgt06.InstallationModeRollback";
ASSERT_EQ(Install(path, PackageType::WGT, RequestResult::FAIL),
ci::AppInstaller::Result::ERROR);
CheckPackageNonExistance(pkgid, {appid});
TEST_F(SmokeTest, UpdateMode_Rollback) {
bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Rollback.wgt";
bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokeapp07";
- std::string appid = "smokeapp07.UpdateModeRollback";
+ std::string pkgid = "smokewgt07";
+ std::string appid = "smokewgt07.UpdateModeRollback";
ASSERT_EQ(Install(path_old, PackageType::WGT), ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, kTestUserId);
ASSERT_EQ(Install(path_new, PackageType::WGT, RequestResult::FAIL),
TEST_F(SmokeTest, MountInstallationMode) {
bf::path path = kSmokePackagesDirectory / "MountInstallationMode.wgt";
- std::string pkgid = "smokeapp28";
- std::string appid = "smokeapp28.InstallationMode";
+ std::string pkgid = "smokewgt28";
+ std::string appid = "smokewgt28.InstallationMode";
ASSERT_EQ(MountInstall(path, PackageType::WGT), ci::AppInstaller::Result::OK);
ScopedTzipInterface interface(pkgid);
ValidatePackage(pkgid, {appid});
TEST_F(SmokeTest, MountUpdateMode) {
bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode.wgt";
bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_2.wgt";
- std::string pkgid = "smokeapp29";
- std::string appid = "smokeapp29.UpdateMode";
+ std::string pkgid = "smokewgt29";
+ std::string appid = "smokewgt29.UpdateMode";
ASSERT_EQ(MountInstall(path_old, PackageType::WGT),
ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, kTestUserId);
TEST_F(SmokeTest, MountInstallationMode_Rollback) {
bf::path path =
kSmokePackagesDirectory / "MountInstallationMode_Rollback.wgt";
- std::string pkgid = "smokeapp33";
- std::string appid = "smokeapp33.web";
+ std::string pkgid = "smokewgt33";
+ std::string appid = "smokewgt33.web";
ASSERT_EQ(MountInstall(path, PackageType::WGT, RequestResult::FAIL),
ci::AppInstaller::Result::ERROR);
ScopedTzipInterface interface(pkgid);
bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Rollback.wgt";
bf::path path_new =
kSmokePackagesDirectory / "MountUpdateMode_Rollback_2.wgt";
- std::string pkgid = "smokeapp34";
- std::string appid = "smokeapp34.web";
+ std::string pkgid = "smokewgt34";
+ std::string appid = "smokewgt34.web";
ASSERT_EQ(MountInstall(path_old, PackageType::WGT),
ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, kTestUserId);
TEST_F(SmokeTest, InstallExternalMode) {
ASSERT_TRUE(CheckAvailableExternalPath());
bf::path path = kSmokePackagesDirectory / "InstallExternalMode.wgt";
- std::string pkgid = "smokeapp35";
- std::string appid = "smokeapp35.web";
+ std::string pkgid = "smokewgt35";
+ std::string appid = "smokewgt35.web";
ASSERT_EQ(InstallExternal(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ValidateExternalPackage(pkgid, {appid});
ASSERT_TRUE(CheckAvailableExternalPath());
bf::path path =
kSmokePackagesDirectory / "MigrateLegacyExternalImageMode.wgt";
- std::string pkgid = "smokeapp36";
- std::string appid = "smokeapp36.web";
+ std::string pkgid = "smokewgt36";
+ std::string appid = "smokewgt36.web";
bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
ASSERT_EQ(MigrateLegacyExternalImage(pkgid, path, legacy_path,
PackageType::WGT), ci::AppInstaller::Result::OK);
TEST_F(SmokeTest, InstallationMode_Preload) {
ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.wgt";
- std::string pkgid = "smokeapp37";
- std::string appid = "smokeapp37.InstallationModePreload";
+ std::string pkgid = "smokewgt37";
+ std::string appid = "smokewgt37.InstallationModePreload";
ASSERT_EQ(InstallPreload(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ValidatePackage(pkgid, {appid}, true);
ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.wgt";
bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.wgt";
- std::string pkgid = "smokeapp38";
- std::string appid = "smokeapp38.UpdateModePreload";
+ std::string pkgid = "smokewgt38";
+ std::string appid = "smokewgt38.UpdateModePreload";
ASSERT_EQ(InstallPreload(path_old, PackageType::WGT),
ci::AppInstaller::Result::OK);
AddDataFiles(pkgid, kTestUserId);
TEST_F(SmokeTest, DeinstallationMode_Preload) {
ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.wgt";
- std::string pkgid = "smokeapp39";
- std::string appid = "smokeapp39.DeinstallationModePreload";
+ std::string pkgid = "smokewgt39";
+ std::string appid = "smokewgt39.DeinstallationModePreload";
ASSERT_EQ(InstallPreload(path, PackageType::WGT),
ci::AppInstaller::Result::OK);
ASSERT_EQ(Uninstall(pkgid, PackageType::WGT, true),