Merge pull request #2048 from Sridhar-MS/msi-changes
Windows Installer changes
This commit is contained in:
commit
4e5fb96a50
8 changed files with 20 additions and 25 deletions
|
@ -22,21 +22,16 @@ namespace Dotnet.Cli.Msi.Tests
|
|||
_msiMgr = new MsiManager(msiFile);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData(@"%SystemDrive%\dotnet")]
|
||||
public void InstallTest(string installLocation)
|
||||
[Fact]
|
||||
public void InstallTest()
|
||||
{
|
||||
installLocation = Environment.ExpandEnvironmentVariables(installLocation);
|
||||
string expectedInstallLocation = string.IsNullOrEmpty(installLocation) ?
|
||||
Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\dotnet") :
|
||||
installLocation;
|
||||
string expectedInstallLocation = Environment.ExpandEnvironmentVariables(@"%ProgramFiles%\dotnet");
|
||||
|
||||
// make sure that the msi is not already installed, if so the machine is in a bad state
|
||||
Assert.False(_msiMgr.IsInstalled, "The dotnet CLI msi is already installed");
|
||||
Assert.False(Directory.Exists(expectedInstallLocation));
|
||||
|
||||
_msiMgr.Install(installLocation);
|
||||
_msiMgr.Install();
|
||||
Assert.True(_msiMgr.IsInstalled);
|
||||
Assert.True(Directory.Exists(expectedInstallLocation));
|
||||
|
||||
|
|
|
@ -45,12 +45,5 @@ namespace Dotnet.Cli.Msi.Tests
|
|||
Assert.Equal(_fixture.InstallLocation, regKey.GetValue("InstallDir"));
|
||||
Assert.NotNull(regKey.GetValue("Version"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UpgradeCodeTest()
|
||||
{
|
||||
// magic number found in https://github.com/dotnet/cli/blob/master/packaging/windows/variables.wxi
|
||||
Assert.Equal("{7D73E4F7-71E2-4236-8CF5-1C499BA3FF50}", _msiMgr.UpgradeCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Dotnet.Cli.Msi.Tests
|
|||
Assert.False(Utils.ExistsOnPath("dotnet.exe"), "After uninstallation dotnet tools must not be on path");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "https://github.com/dotnet/cli/issues/2073")]
|
||||
public void DotnetRegKeysTest()
|
||||
{
|
||||
Assert.True(_msiMgr.IsInstalled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue