Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
$modulePath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'TempModules'
Write-Verbose -Verbose "Install Microsoft.PowerShell.PSResourceGet to temp module path"
Save-Module -Name Microsoft.PowerShell.PSResourceGet -Path $modulePath -Force -Verbose
Write-Verbose -Verbose "Install Pester 4.X to temp module path"
Save-Module -Name "Pester" -MaximumVersion 4.99 -Path $modulePath -Force
Write-Verbose -Verbose "Install Pester 6.2.0 to temp module path"
Save-Module -Name "Pester" -RequiredVersion 6.2.0 -Path $modulePath -Force
displayName: Install Microsoft.PowerShell.PSResourceGet and Pester

- ${{ parameters.powershellExecutable }}: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ Describe 'Test Find-PSResource for unauthenticated ACR repository' -tags 'CI' {
It "Should find resource given specific Name, Version null" {

if ($skipOnWinPS) {
Set-ItResult -Pending -Because "Skipping test on Windows PowerShell"
Set-ItResult -Skipped -Because "Skipping test on Windows PowerShell"
return
}

Expand Down
4 changes: 2 additions & 2 deletions test/FindPSResourceTests/FindPSResourceLocal.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ Describe 'Test Find-PSResource for local repositories' -tags 'CI' {
}
}

It "find resource given CommandName" -Pending {
It "find resource given CommandName" -Skip {
$res = Find-PSResource -CommandName $commandName -Repository $localRepo
$res | Should -Not -BeNullOrEmpty
foreach ($item in $res) {
Expand All @@ -314,7 +314,7 @@ Describe 'Test Find-PSResource for local repositories' -tags 'CI' {
}
}

It "find resource given DscResourceName" -Pending {
It "find resource given DscResourceName" -Skip {
$res = Find-PSResource -DscResourceName $dscResourceName -Repository $localRepo
$res | Should -Not -BeNullOrEmpty
foreach ($item in $res) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Describe 'Test Find-PSResource for searching and looping through repositories' -
$pkg2.Repository | Should -Be $NuGetGalleryName
}

It "find resources from pattern matching repositories where it exists and error report for specific repositories (-Repository with wildcard and specific repositories)" -Pending {
It "find resources from pattern matching repositories where it exists and error report for specific repositories (-Repository with wildcard and specific repositories)" -Skip {
# Package "test_script" exists in the following repositories: PSGallery, NuGetGallery
$res = Find-PSResource -Name $testScriptName -Repository "*Gallery",$localRepoName -ErrorVariable err -ErrorAction SilentlyContinue
$err | Should -HaveCount 1
Expand All @@ -191,7 +191,7 @@ Describe 'Test Find-PSResource for searching and looping through repositories' -
$err[0].FullyQualifiedErrorId | Should -BeExactly "PackageNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource"
}

It "not find resources from pattern matching repositories if it doesn't exist and only write for for specific repositories (-Repository with wildcard and specific repositories)" -Pending {
It "not find resources from pattern matching repositories if it doesn't exist and only write for for specific repositories (-Repository with wildcard and specific repositories)" -Skip {
# Package "nonExistentPkg" does not exist in any repo
$res = Find-PSResource -Name "nonExistentPkg" -Repository "*Gallery",$localRepoName -ErrorVariable err -ErrorAction SilentlyContinue
$err | Should -HaveCount 1
Expand Down Expand Up @@ -238,7 +238,7 @@ Describe 'Test Find-PSResource for searching and looping through repositories' -
$err[0].FullyQualifiedErrorId | Should -BeExactly "PackageNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource"
}

It "not find resource if it does not exist in repository and not write error given package Name with wildcard (-Repository with single non-wildcard value)" -Pending {
It "not find resource if it does not exist in repository and not write error given package Name with wildcard (-Repository with single non-wildcard value)" -Skip {
$res = Find-PSResource -Name "NonExistentPkg*" -Repository $PSGalleryName -ErrorVariable err -ErrorAction SilentlyContinue
$res | Should -HaveCount 0
$err | Should -HaveCount 0
Expand Down Expand Up @@ -271,7 +271,7 @@ Describe 'Test Find-PSResource for searching and looping through repositories' -
$err[0].FullyQualifiedErrorId | Should -BeExactly "PackageNotFound,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource"
}

It "should not find resource from repositories where it does not exist and not write error since package Name contains wildcard" -Pending {
It "should not find resource from repositories where it does not exist and not write error since package Name contains wildcard" -Skip {
$res = Find-PSResource -Name "NonExistentPkg*" -Repository $PSGalleryName,$NuGetGalleryName -ErrorVariable err -ErrorAction SilentlyContinue
$res | Should -HaveCount 0
$err | Should -HaveCount 0
Expand Down
2 changes: 1 addition & 1 deletion test/InstallPSResourceTests/InstallAz.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Describe 'Test Install-PSResource for the Az module' -tags 'CI' {
Get-RevertPSResourceRepositoryFile
}

It "Install Az module and all dependencies" -Pending {
It "Install Az module and all dependencies" -Skip {
Install-PSResource -Name $azName -Repository $PSGalleryName -TrustRepository -Reinstall

$pkg = Get-InstalledPSResource $azName
Expand Down
10 changes: 5 additions & 5 deletions test/PublishPSResourceTests/PublishPSResource.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
Expand-Archive -Path $expectedNupkgPath -DestinationPath $expectedExpandedPath
$expectedNuspec = Join-path -Path $expectedExpandedPath -ChildPath "$script:PublishModuleName.nuspec"
$expectedNuspecContents = Get-Content -Path $expectedNuspec -Raw
$expectedNuspecContents.Contains($releaseNotes) | Should Be $true
$expectedNuspecContents.Contains($releaseNotes) | Should -BeTrue
}
It "Publish a module with -LicenseUrl" {
$version = "1.0.0"
Expand All @@ -524,7 +524,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
Expand-Archive -Path $expectedNupkgPath -DestinationPath $expectedExpandedPath
$expectedNuspec = Join-path -Path $expectedExpandedPath -ChildPath "$script:PublishModuleName.nuspec"
$expectedNuspecContents = Get-Content -Path $expectedNuspec -Raw
$expectedNuspecContents.Contains($licenseUrl) | Should Be $true
$expectedNuspecContents.Contains($licenseUrl) | Should -BeTrue
}
It "Publish a module with -IconUrl" {
$version = "1.0.0"
Expand All @@ -538,7 +538,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
Expand-Archive -Path $expectedNupkgPath -DestinationPath $expectedExpandedPath
$expectedNuspec = Join-path -Path $expectedExpandedPath -ChildPath "$script:PublishModuleName.nuspec"
$expectedNuspecContents = Get-Content -Path $expectedNuspec -Raw
$expectedNuspecContents.Contains($iconUrl) | Should Be $true
$expectedNuspecContents.Contains($iconUrl) | Should -BeTrue
}
It "Publish a module with -ProjectUrl" {
$version = "1.0.0"
Expand All @@ -552,7 +552,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
Expand-Archive -Path $expectedNupkgPath -DestinationPath $expectedExpandedPath
$expectedNuspec = Join-path -Path $expectedExpandedPath -ChildPath "$script:PublishModuleName.nuspec"
$expectedNuspecContents = Get-Content -Path $expectedNuspec -Raw
$expectedNuspecContents.Contains($projectUrl) | Should Be $true
$expectedNuspecContents.Contains($projectUrl) | Should -BeTrue
}
It "Publish a module with -Tags" {
$version = "1.0.0"
Expand All @@ -566,7 +566,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
Expand-Archive -Path $expectedNupkgPath -DestinationPath $expectedExpandedPath
$expectedNuspec = Join-path -Path $expectedExpandedPath -ChildPath "$script:PublishModuleName.nuspec"
$expectedNuspecContents = Get-Content -Path $expectedNuspec -Raw
$expectedNuspecContents.Contains($tags) | Should Be $true
$expectedNuspecContents.Contains($tags) | Should -BeTrue
}
#>
It "Publish a module to PSGallery without -APIKey, should throw" {
Expand Down
2 changes: 1 addition & 1 deletion test/SavePSResourceTests/SavePSResourceV2.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Describe 'Test HTTP Save-PSResource for V2 Server Protocol' -tags 'CI' {

### TODO: this is broken because the "Prerelease" parameter is a boolean, but the type from
### the input object is of type string (ie "true").
It "Save PSResourceInfo object piped in for prerelease version object" -Pending {
It "Save PSResourceInfo object piped in for prerelease version object" -Skip {
Find-PSResource -Name $testModuleName -Version "5.2.5-alpha001" -Repository $PSGalleryName | Save-PSResource -Path $SaveDir -TrustRepository -Verbose
$pkgDir = Get-ChildItem -Path $SaveDir | Where-Object Name -EQ $testModuleName
$pkgDir | Should -Not -BeNullOrEmpty
Expand Down
2 changes: 1 addition & 1 deletion test/SavePSResourceTests/SavePSResourceV3.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Describe 'Test HTTP Save-PSResource for V3 Server Protocol' -tags 'CI' {

### TODO: this is broken because the "Prerelease" parameter is a boolean, but the type from
### the input object is of type string (ie "true").
It 'Save PSResourceInfo object piped in for prerelease version object' -Pending{
It 'Save PSResourceInfo object piped in for prerelease version object' -Skip{
Find-PSResource -Name $testModuleName -Version '5.2.5-alpha001' -Repository $NuGetGalleryName | Save-PSResource -Path $SaveDir -TrustRepository
$pkgDir = Get-ChildItem -Path $SaveDir | Where-Object Name -EQ $testModuleName
$pkgDir | Should -Not -BeNullOrEmpty
Expand Down