Skip to content

Commit

Permalink
try rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed Nov 14, 2023
1 parent 01ccda4 commit 0b6da99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/AppInstallerCLIE2ETests/Helpers/WinGetSettingsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public static void InitializeWingetSettings()
{ "directMSI", false },
{ "windowsFeature", false },
{ "resume", false },
{ "reboot", false },
}
},
{
Expand Down Expand Up @@ -210,6 +211,7 @@ public static void InitializeAllFeatures(bool status)
ConfigureFeature("directMSI", status);
ConfigureFeature("windowsFeature", status);
ConfigureFeature("resume", status);
ConfigureFeature("reboot", status);
}

private static JObject GetJsonSettingsObject(string objectName)
Expand Down
8 changes: 6 additions & 2 deletions src/AppInstallerCLIE2ETests/ResumeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ public void InstallRequiresRebootToFinish()
var checkpointsDir = TestCommon.GetCheckpointsDirectory();
int initialCheckpointsCount = Directory.Exists(checkpointsDir) ? Directory.GetDirectories(checkpointsDir).Length : 0;

var result = TestCommon.RunAICLICommand("install", $"--id AppInstallerTest.RebootRequired --custom '/ExitCode 9'");
var installDir = TestCommon.GetRandomTestDir();
var result = TestCommon.RunAICLICommand("install", $"TestRebootRequired --custom '/ExitCode 9' -l {installDir}");
Assert.AreNotEqual(Constants.ErrorCode.ERROR_INSTALL_REBOOT_REQUIRED_TO_FINISH, result.ExitCode);
Assert.True(result.StdOut.Contains("Restart your PC to finish installation."));
Assert.True(TestCommon.VerifyTestExeInstalledAndCleanup(installDir));

int actualCheckpointsCount = Directory.GetDirectories(checkpointsDir).Length;

Expand All @@ -96,9 +98,11 @@ public void InstallRequiresRebootToInstall()

int initialCheckpointsCount = Directory.Exists(checkpointsDir) ? Directory.GetDirectories(checkpointsDir).Length : 0;

var result = TestCommon.RunAICLICommand("install", $"--id AppInstallerTest.RebootRequired --custom '/ExitCode 10'");
var installDir = TestCommon.GetRandomTestDir();
var result = TestCommon.RunAICLICommand("install", $"TestRebootRequired --custom '/ExitCode 10' -l {installDir}");
Assert.AreNotEqual(Constants.ErrorCode.ERROR_INSTALL_REBOOT_REQUIRED_FOR_INSTALL, result.ExitCode);
Assert.True(result.StdOut.Contains("Installation failed. Restart your PC then try again."));
Assert.True(TestCommon.VerifyTestExeInstalledAndCleanup(installDir));

int actualCheckpointsCount = Directory.GetDirectories(checkpointsDir).Length;
Assert.AreEqual(initialCheckpointsCount + 1, actualCheckpointsCount);
Expand Down

0 comments on commit 0b6da99

Please sign in to comment.