forked from chocolatey/choco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#1092) Add tests for dependencies' beforeModify
This test added ensures that when we are upgrading a package, both its own and any dependencies' beforeModify are run so that we can properly update dependencies which might need to shut down a long-running service before being upgraded.
- Loading branch information
Showing
24 changed files
with
499 additions
and
0 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
22 changes: 22 additions & 0 deletions
22
...ciesbeforemodify/hasdependencywithbeforemodify/1.0.0/hasdependencywithbeforemodify.nuspec
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>hasdependencywithbeforemodify</id> | ||
<version>1.0.0</version> | ||
<title>hasdependencywithbeforemodify</title> | ||
<authors>__REPLACE_AUTHORS_OF_SOFTWARE__</authors> | ||
<owners>__REPLACE_YOUR_NAME__</owners> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>__REPLACE__</description> | ||
<summary>__REPLACE__</summary> | ||
<releaseNotes /> | ||
<copyright /> | ||
<tags>hasdependencywithbeforemodify admin</tags> | ||
<dependencies> | ||
<dependency id="isdependencywithbeforemodify" version="[1.0.0, 2.0.0.0)" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
1 change: 1 addition & 0 deletions
1
...ndenciesbeforemodify/hasdependencywithbeforemodify/1.0.0/tools/chocolateyBeforeModify.ps1
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 @@ | ||
Write-Output "Ran BeforeModify: $env:PackageName $env:PackageVersion" |
1 change: 1 addition & 0 deletions
1
.../dependenciesbeforemodify/hasdependencywithbeforemodify/1.0.0/tools/chocolateyinstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Installed" |
1 change: 1 addition & 0 deletions
1
...ependenciesbeforemodify/hasdependencywithbeforemodify/1.0.0/tools/chocolateyuninstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Uninstalled" |
1 change: 1 addition & 0 deletions
1
...on/context/dependenciesbeforemodify/hasdependencywithbeforemodify/1.0.0/tools/purpose.txt
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 @@ | ||
This package is used to test out upgrade behaviour with beforeModify scripts in play for the main package and dependencies. |
22 changes: 22 additions & 0 deletions
22
...ciesbeforemodify/hasdependencywithbeforemodify/2.0.0/hasdependencywithbeforemodify.nuspec
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>hasdependencywithbeforemodify</id> | ||
<version>2.0.0</version> | ||
<title>hasdependencywithbeforemodify</title> | ||
<authors>__REPLACE_AUTHORS_OF_SOFTWARE__</authors> | ||
<owners>__REPLACE_YOUR_NAME__</owners> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>__REPLACE__</description> | ||
<summary>__REPLACE__</summary> | ||
<releaseNotes /> | ||
<copyright /> | ||
<tags>hasdependencywithbeforemodify admin</tags> | ||
<dependencies> | ||
<dependency id="isdependencywithbeforemodify" version="[2.0.0, 3.0.0.0)" /> | ||
</dependencies> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
1 change: 1 addition & 0 deletions
1
...ndenciesbeforemodify/hasdependencywithbeforemodify/2.0.0/tools/chocolateyBeforeModify.ps1
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 @@ | ||
Write-Output "Ran BeforeModify: $env:PackageName $env:PackageVersion" |
1 change: 1 addition & 0 deletions
1
.../dependenciesbeforemodify/hasdependencywithbeforemodify/2.0.0/tools/chocolateyinstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Installed" |
1 change: 1 addition & 0 deletions
1
...ependenciesbeforemodify/hasdependencywithbeforemodify/2.0.0/tools/chocolateyuninstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Uninstalled" |
1 change: 1 addition & 0 deletions
1
...on/context/dependenciesbeforemodify/hasdependencywithbeforemodify/2.0.0/tools/purpose.txt
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 @@ | ||
This package is used to test out upgrade behaviour with beforeModify scripts in play for the main package and dependencies. |
18 changes: 18 additions & 0 deletions
18
...enciesbeforemodify/isdependencywithbeforemodify/1.0.0/isdependencywithbeforemodify.nuspec
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,18 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>isdependencywithbeforemodify</id> | ||
<version>1.0.0</version> | ||
<title>isdependencywithbeforemodify</title> | ||
<authors>__REPLACE_AUTHORS_OF_SOFTWARE__</authors> | ||
<owners>__REPLACE_YOUR_NAME__</owners> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>__REPLACE__</description> | ||
<summary>__REPLACE__</summary> | ||
<releaseNotes /> | ||
<tags>isdependencywithbeforemodify admin</tags> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
1 change: 1 addition & 0 deletions
1
...endenciesbeforemodify/isdependencywithbeforemodify/1.0.0/tools/chocolateyBeforeModify.ps1
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 @@ | ||
Write-Output "Ran BeforeModify: $env:PackageName $env:PackageVersion" |
1 change: 1 addition & 0 deletions
1
...t/dependenciesbeforemodify/isdependencywithbeforemodify/1.0.0/tools/chocolateyinstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Installed" |
1 change: 1 addition & 0 deletions
1
...dependenciesbeforemodify/isdependencywithbeforemodify/1.0.0/tools/chocolateyuninstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Uninstalled" |
1 change: 1 addition & 0 deletions
1
...ion/context/dependenciesbeforemodify/isdependencywithbeforemodify/1.0.0/tools/purpose.txt
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 @@ | ||
This package is used to test out upgrade behaviour with beforeModify scripts in play for the main package and dependencies. |
18 changes: 18 additions & 0 deletions
18
...enciesbeforemodify/isdependencywithbeforemodify/2.0.0/isdependencywithbeforemodify.nuspec
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,18 @@ | ||
<?xml version="1.0"?> | ||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||
<metadata> | ||
<id>isdependencywithbeforemodify</id> | ||
<version>2.0.0</version> | ||
<title>isdependencywithbeforemodify</title> | ||
<authors>__REPLACE_AUTHORS_OF_SOFTWARE__</authors> | ||
<owners>__REPLACE_YOUR_NAME__</owners> | ||
<requireLicenseAcceptance>false</requireLicenseAcceptance> | ||
<description>__REPLACE__</description> | ||
<summary>__REPLACE__</summary> | ||
<releaseNotes /> | ||
<tags>isdependencywithbeforemodify admin</tags> | ||
</metadata> | ||
<files> | ||
<file src="tools\**" target="tools" /> | ||
</files> | ||
</package> |
1 change: 1 addition & 0 deletions
1
...endenciesbeforemodify/isdependencywithbeforemodify/2.0.0/tools/chocolateyBeforeModify.ps1
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 @@ | ||
Write-Output "Ran BeforeModify: $env:PackageName $env:PackageVersion" |
1 change: 1 addition & 0 deletions
1
...t/dependenciesbeforemodify/isdependencywithbeforemodify/2.0.0/tools/chocolateyinstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Installed" |
1 change: 1 addition & 0 deletions
1
...dependenciesbeforemodify/isdependencywithbeforemodify/2.0.0/tools/chocolateyuninstall.ps1
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 @@ | ||
Write-Output "$env:PackageName $env:PackageVersion Uninstalled" |
1 change: 1 addition & 0 deletions
1
...ion/context/dependenciesbeforemodify/isdependencywithbeforemodify/2.0.0/tools/purpose.txt
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 @@ | ||
This package is used to test out upgrade behaviour with beforeModify scripts in play for the main package and dependencies. |
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
Oops, something went wrong.