-
Notifications
You must be signed in to change notification settings - Fork 908
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2813 from AdmiringWorm/a2787-Deprecate-side-by-si…
…de-installs (#2787) Deprecate side by side installations
- Loading branch information
Showing
15 changed files
with
289 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Import-Module helpers/common-helpers | ||
|
||
Describe "choco uninstall" -Tag Chocolatey, UninstallCommand { | ||
BeforeAll { | ||
Initialize-ChocolateyTestInstall | ||
|
||
New-ChocolateyInstallSnapshot | ||
} | ||
|
||
AfterAll { | ||
Remove-ChocolateyTestInstall | ||
} | ||
|
||
Context "Uninstalling a side-by-side Package" { | ||
BeforeAll { | ||
Restore-ChocolateyInstallSnapshot | ||
|
||
$PackageUnderTest = "installpackage" | ||
|
||
$null = Invoke-Choco upgrade $PackageUnderTest --confirm --allowmultipleversions | ||
|
||
$Output = Invoke-Choco uninstall $PackageUnderTest --confirm | ||
} | ||
|
||
It "Exits with Success (0)" { | ||
$Output.ExitCode | Should -Be 0 | ||
} | ||
|
||
It "Removed a package to the lib directory" { | ||
"$env:ChocolateyInstall\lib\$($PackageUnderTest).1.0.0" | Should -Not -Exist | ||
"$env:ChocolateyInstall\lib-bad\$($PackageUnderTest).1.0.0" | Should -Not -Exist | ||
} | ||
|
||
It "Outputs a warning message that installed side by side package is deprecated" { | ||
$Output.Lines | Should -Contain "$PackageUnderTest has been installed as a side by side installation." -Because $Output.String | ||
$Output.Lines | Should -Contain "Side by side installations are deprecated and is pending removal in v2.0.0." -Because $Output.String | ||
} | ||
|
||
It "Outputs a message indicating that it uninstalled the package successfully" { | ||
$Output.Lines | Should -Contain "Chocolatey uninstalled 1/1 packages." -Because $Output.String | ||
} | ||
} | ||
} |
Oops, something went wrong.