Skip to content

Commit 6293103

Browse files
committed
(maint) Changes during pairing session
During a pairing session between Kim and Gary, some changes were made to the PR. These weren't particularly involved changes, but minor tweaks based on the review.
1 parent 8707eea commit 6293103

7 files changed

+9
-13
lines changed

Invoke-Tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Requires -Module @{ ModuleName = 'pester'; ModuleVersion = '5.3.1' }
1+
#Requires -Module @{ ModuleName = 'pester'; ModuleVersion = '5.3.1' }
22
#Requires -RunAsAdministrator
33
<#
44
.SYNOPSIS

tests/Vagrantfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Vagrant.configure("2") do |config|
6969
Push-Location c:/code/choco
7070
# $env:TEST_KITCHEN = 1
7171
$env:VM_RUNNING = 1
72-
./Invoke-Tests.ps1 -SkipPackaging
72+
./Invoke-Tests.ps1
7373
Copy-Item $env:ALLUSERSPROFILE/chocolatey/logs/testInvocations.log C:/vagrant
7474
SHELL
7575
end

tests/chocolatey-tests/commands/choco-info.Tests.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@
196196
}
197197

198198
Context "Listing package information for non-normalized exact package version" -ForEach @(
199+
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1' }
200+
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1.0' }
199201
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1.0.0' }
200202
@{ ExpectedPackageVersion = '4.0.1' ; SearchVersion = '4.0.1' }
201203
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '01.0.0.0' }

tests/chocolatey-tests/commands/choco-install.Tests.ps1

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Describe "choco install" -Tag Chocolatey, InstallCommand {
1+
Describe "choco install" -Tag Chocolatey, InstallCommand {
22
BeforeDiscovery {
33
$isLicensed30OrMissingVersion = Test-PackageIsEqualOrHigher 'chocolatey.extension' '3.0.0-beta' -AllowMissingPackage
44
$licensedProxyFixed = Test-PackageIsEqualOrHigher 'chocolatey.extension' 2.2.0-beta -AllowMissingPackage
@@ -1775,6 +1775,8 @@ To install a local, or remote file, you may use:
17751775
}
17761776

17771777
Context "Installing a package with a non-normalized version number" -ForEach @(
1778+
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1' ; NuspecVersion = '01.0.0.0'}
1779+
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1.0' ; NuspecVersion = '01.0.0.0'}
17781780
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '1.0.0' ; NuspecVersion = '01.0.0.0' }
17791781
@{ ExpectedPackageVersion = '4.0.1' ; SearchVersion = '4.0.1' ; NuspecVersion = '004.0.01.0' }
17801782
@{ ExpectedPackageVersion = '1.0.0' ; SearchVersion = '01.0.0.0' ; NuspecVersion = '01.0.0.0' }
@@ -1783,15 +1785,10 @@ To install a local, or remote file, you may use:
17831785
) {
17841786
BeforeAll {
17851787
Restore-ChocolateyInstallSnapshot
1786-
Push-Location (New-Item "$(Get-TempDirectory)/$(New-Guid)" -ItemType Directory)
17871788
$PackageUnderTest = 'nonnormalizedversions'
17881789
$Output = Invoke-Choco install $PackageUnderTest --Version $SearchVersion
17891790
}
17901791

1791-
AfterAll {
1792-
Pop-Location
1793-
}
1794-
17951792
It "Should exit with success (0)" {
17961793
$Output.ExitCode | Should -Be 0 -Because $Output.String
17971794
}

tests/chocolatey-tests/commands/choco-pack.Tests.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ Describe "choco pack" -Tag Chocolatey, PackCommand {
591591
@{ ExpectedPackageVersion = '1.2.4' ; ProvidedVersion = '01.02.04' }
592592
@{ ExpectedPackageVersion = '1.2.0' ; ProvidedVersion = '01.02' }
593593
@{ ExpectedPackageVersion = '1.2.3' ; ProvidedVersion = '0001.0002.0003' }
594+
@{ ExpectedPackageVersion = '2.0.0' ; ProvidedVersion = '02' }
594595
) {
595596
BeforeAll {
596597
Restore-ChocolateyInstallSnapshot

tests/chocolatey-tests/commands/choco-uninstall.Tests.ps1

-4
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,6 @@ Describe "choco uninstall" -Tag Chocolatey, UninstallCommand {
430430
$Output = Invoke-Choco uninstall $PackageUnderTest
431431
}
432432

433-
AfterAll {
434-
Pop-Location
435-
}
436-
437433
It "Should exit with success (0)" {
438434
$Output.ExitCode | Should -Be 0 -Because $Output.String
439435
}

tests/chocolatey-tests/commands/choco-upgrade.Tests.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Describe "choco upgrade" -Tag Chocolatey, UpgradeCommand {
1+
Describe "choco upgrade" -Tag Chocolatey, UpgradeCommand {
22
BeforeAll {
33
Remove-NuGetPaths
44
Initialize-ChocolateyTestInstall

0 commit comments

Comments
 (0)