This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Test Package
Paul Broadwith edited this page Jun 27, 2017
·
1 revision
Test-Package
Test Chocolatey package
Test-Package [[-Nu] <Object>] [-Install] [-Uninstall] [[-Parameters] <String>] [[-Vagrant] <String>] [-VagrantOpen] [-VagrantNoClear]
[<CommonParameters>]
The function can test install, uninistall or both and provide package parameters during test.
It will force install and then remove the Chocolatey package if called without arguments.
It accepts either nupkg or nuspec path. If none specified, current directory will be searched
for any of them.
-Nu <Object>
If file, path to the .nupkg or .nuspec file for the package.
If directory, latest .nupkg or .nuspec file wil be looked in it.
If ommited current directory will be used.
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Install [<SwitchParameter>]
Test chocolateyInstall.ps1 only.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Uninstall [<SwitchParameter>]
Test chocolateyUninstall.ps1 only.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Parameters <String>
Package parameters
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Vagrant <String>
Path to chocolatey-test-environment: https://github.com/majkinetor/chocolatey-test-environment
Required? false
Position? 3
Default value $Env:au_Vagrant
Accept pipeline input? false
Accept wildcard characters? false
-VagrantOpen [<SwitchParameter>]
Open new shell window
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-VagrantNoClear [<SwitchParameter>]
Do not remove existing packages from vagrant package directory
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
-------------------------- EXAMPLE 1 --------------------------
PS C:\>Test-Package -Install
Test the install of the package from the current directory.
https://github.com/chocolatey/choco/wiki/CreatePackages#testing-your-package
NOTE: This documentation has been automatically generated from Get-Help Test-Package -Full
.