Skip to content

Commit

Permalink
clean up test properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed Nov 18, 2024
1 parent a49ac4c commit 20b86a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/AppInstallerCLIE2ETests/ConfigureCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ public void ConfigureFromTestRepo_SettingsDefaultModuleRoot()
var result = TestCommon.RunAICLICommand(CommandAndAgreementsAndVerbose, args);

WinGetSettingsHelper.ConfigureInstallBehavior(Constants.DefaultModuleRoot, string.Empty);
bool moduleExists = Directory.Exists(Path.Combine(moduleTestDir, Constants.SimpleTestModuleName));
if (moduleExists)
{
// Clean test directory to avoid impacting other tests.
Directory.Delete(moduleTestDir, true);
}

Assert.AreEqual(0, result.ExitCode);
Assert.True(Directory.Exists(Path.Combine(moduleTestDir, Constants.SimpleTestModuleName)));
Assert.True(moduleExists);
}

/// <summary>
Expand Down

0 comments on commit 20b86a3

Please sign in to comment.