Skip to content

Commit 67223fe

Browse files
committed
Fix test with API key
1 parent 5fcaf93 commit 67223fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/PublishPSResourceTests/PublishPSResource.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ Describe "Test Publish-PSResource" -tags 'CI' {
433433
It "Publish a module to PSGallery using incorrect API key, should throw" {
434434
$version = "1.0.0"
435435
New-ModuleManifest -Path (Join-Path -Path $script:PublishModuleBase -ChildPath "$script:PublishModuleName.psd1") -ModuleVersion $version -Description "$script:PublishModuleName module"
436-
437-
Publish-PSResource -Path $script:PublishModuleBase -Repository PSGallery -APIKey "123456789" -ErrorAction SilentlyContinue
436+
$APIKey = New-Guid
437+
Publish-PSResource -Path $script:PublishModuleBase -Repository PSGallery -APIKey $APIKey -ErrorAction SilentlyContinue
438438

439439
$Error[0].FullyQualifiedErrorId | Should -be "403Error,Microsoft.PowerShell.PSResourceGet.Cmdlets.PublishPSResource"
440440
}

0 commit comments

Comments
 (0)