Skip to content

Commit

Permalink
More appveyor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom committed Jan 23, 2021
1 parent 50528d8 commit 890b0b5
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Test/ChocolateyGet.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Describe "$platform basic package search operations" {
$argsAndParams = '--exact'

It 'searches for the exact package name' {
Find-Package -Provider $ChocolateyGet -Name $package -AdditionalArguments $argsAndParams | Should Not BeNullOrEmpty
Find-Package -Provider $ChocolateyGet -Name $package | Should Not BeNullOrEmpty
}
}
}
Expand All @@ -54,19 +54,18 @@ Describe "$platform DSC-compliant package installation and uninstallation" {
}
Context 'with additional arguments' {
$package = 'sysinternals'
# $argsAndParams = '--paramsglobal --params "/InstallDir=c:\windows\temp\sysinternals /QuickLaunchShortcut=false" -y --installargs MaintenanceService=false'

It 'searches for the latest version of a package' {
Find-Package -Provider $ChocolateyGet -Name $package -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Find-Package -Provider $ChocolateyGet -Name $package -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}
It 'silently installs the latest version of a package' {
Install-Package -Force -Provider $ChocolateyGet -Name $package -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Install-Package -Force -Provider $ChocolateyGet -Name $package -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}
It 'finds the locally installed package just installed' {
Get-Package -Provider $ChocolateyGet -Name $package -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Get-Package -Provider $ChocolateyGet -Name $package -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}
It 'silently uninstalls the locally installed package just installed' {
Uninstall-Package -Provider $ChocolateyGet -Name $package -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Uninstall-Package -Provider $ChocolateyGet -Name $package -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}
}
}
Expand All @@ -84,14 +83,13 @@ Describe "$platform pipline-based package installation and uninstallation" {
}
Context 'with additional arguments' {
$package = 'sysinternals'
# $argsAndParams = '--paramsglobal --params "/InstallDir=c:\windows\temp\sysinternals /QuickLaunchShortcut=false" -y --installargs MaintenanceService=false'

It 'searches for and silently installs the latest version of a package' {
Find-Package -Provider $ChocolateyGet -Name $package -Verbose | Install-Package -Force -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Find-Package -Provider $ChocolateyGet -Name $package -Verbose | Install-Package -Force -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}

It 'finds and silently uninstalls the locally installed package just installed' {
Get-Package -Provider $ChocolateyGet -Name $package -Verbose | Uninstall-Package -AdditionalArguments $argsAndParams -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
Get-Package -Provider $ChocolateyGet -Name $package -Verbose | Uninstall-Package -Verbose | Where-Object {$_.Name -contains $package} | Should Not BeNullOrEmpty
}
}
}
Expand Down

0 comments on commit 890b0b5

Please sign in to comment.