@@ -270,16 +270,20 @@ Describe "Test Publish-PSResource" -tags 'CI' {
270270 $dependencyVersion = " 2.0.0"
271271 New-ModuleManifest - Path (Join-Path - Path $script :DependencyModuleBase - ChildPath " $script :DependencyModuleName .psd1" ) - ModuleVersion $dependencyVersion - Description " $script :DependencyModuleName module"
272272
273- Publish-PSResource - Path $script :DependencyModuleBase
273+ Publish-PSResource - Path $script :DependencyModuleBase - Repository $testRepository2
274+ $pkg1 = Find-PSResouce $script :DependencyModuleName - Repository $testRepository2
275+ $pkg1 | Should -Not - BeNullOrEmpty
276+ $pkg1.Version | Should - Be $dependencyVersion
274277
275278 # Create module to test
276279 $version = " 1.0.0"
277280 New-ModuleManifest - Path (Join-Path - Path $script :PublishModuleBase - ChildPath " $script :PublishModuleName .psd1" ) - ModuleVersion $version - Description " $script :PublishModuleName module" - RequiredModules @ (@ {ModuleName = ' PackageManagement' ; ModuleVersion = ' 2.0.0' })
278281
279- Publish-PSResource - Path $script :PublishModuleBase
282+ Publish-PSResource - Path $script :PublishModuleBase - Repository $testRepository2
280283
281- $nupkg = Get-ChildItem $script :repositoryPath | select-object - Last 1
282- $nupkg.Name | Should - Be " $script :PublishModuleName .$version .nupkg"
284+ $pkg2 = Find-PSResouce $script :DependencyModuleName - Repository $testRepository2
285+ $pkg2 | Should -Not - BeNullOrEmpty
286+ $pkg2.Version | Should - Be $dependencyVersion
283287 }
284288
285289 It " Publish a module with a dependency that is not published, should throw" {
@@ -685,7 +689,7 @@ Describe "Test Publish-PSResource" -tags 'CI' {
685689 $expectedPath = Join-Path - Path $script :repositoryPath2 - ChildPath " $ParentModuleName .$ParentVersion .nupkg"
686690 (Get-ChildItem $script :repositoryPath2 ).FullName | Should - Contain $expectedPath
687691 }
688-
692+ <#
689693 It "Publish a module with required modules (both in string format and hashtable format)" {
690694 # look at functions in test utils for creating a module with prerelease
691695 $ModuleName = "ParentModule"
@@ -720,4 +724,5 @@ Describe "Test Publish-PSResource" -tags 'CI' {
720724 $expectedPath = Join-Path -Path $script:repositoryPath2 -ChildPath "$ModuleName.$ModuleVersion.nupkg"
721725 (Get-ChildItem $script:repositoryPath2).FullName | Should -Contain $expectedPath
722726 }
727+ #>
723728}
0 commit comments