Skip to content

Commit 336d910

Browse files
committed
add test for preview install
1 parent dd17571 commit 336d910

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/InstallPSResourceTests/InstallPSResourceContainerRegistryServer.Tests.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ Describe 'Test Install-PSResource for ACR scenarios' -tags 'CI' {
108108
$res.Version | Should -Be "1.0"
109109
}
110110

111+
It "Install resource when version contains different number of digits than the normalized version- 4 digits specified and prerelease" {
112+
# the resource has version "1.0", but querying with any equivalent version should work
113+
Install-PSResource -Name $testModuleWith2DigitVersion -Version "1.5.0.0" -Repository $ACRRepoName -TrustRepository
114+
$res = Get-InstalledPSResource -Name $testModuleWith2DigitVersion
115+
$res | Should -Not -BeNullOrEmpty
116+
$res.Version | Should -Be "1.5"
117+
$res.Prerelease | Should -Be "alpha"
118+
}
119+
111120
It "Install multiple resources by name" {
112121
$pkgNames = @($testModuleName, $testModuleName2)
113122
Install-PSResource -Name $pkgNames -Repository $ACRRepoName -TrustRepository

0 commit comments

Comments
 (0)