Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/code/V2ServerAPICalls.cs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ private string FindAllFromTypeEndPoint(bool includePrerelease, bool isSearchingM
} else {
filterBuilder.AddCriterion("IsLatestVersion");
}
var requestUrlV2 = $"{Repository.Uri}{typeEndpoint}/Search()?$filter={queryBuilder.BuildQueryString()}";
var requestUrlV2 = $"{Repository.Uri}{typeEndpoint}/Search()?{queryBuilder.BuildQueryString()}";
return HttpRequestCall(requestUrlV2, out errRecord);
}

Expand Down
7 changes: 6 additions & 1 deletion test/FindPSResourceTests/FindPSResourceV2Server.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $modPath = "$psscriptroot/../PSGetTestUtils.psm1"
Import-Module $modPath -Force -Verbose

$psmodulePaths = $env:PSModulePath -split ';'
Write-Verbose -Verbose "Current module search paths: $psmodulePaths"
Write-Verbose -Verbose -Message "Current module search paths: $psmodulePaths"

Describe 'Test HTTP Find-PSResource for V2 Server Protocol' -tags 'CI' {

Expand Down Expand Up @@ -56,6 +56,11 @@ Describe 'Test HTTP Find-PSResource for V2 Server Protocol' -tags 'CI' {
$foundScript | Should -BeTrue
}

It "find all resources when wildcard only for Name" {
$res = Find-PSResource -Name '*' -Repository $PSGalleryName
$res.Count | Should -BeGreaterThan 0
}

$testCases2 = @{Version="[5.0.0.0]"; ExpectedVersions=@("5.0.0.0"); Reason="validate version, exact match"},
@{Version="5.0.0.0"; ExpectedVersions=@("5.0.0.0"); Reason="validate version, exact match without bracket syntax"},
@{Version="[1.0.0.0, 5.0.0.0]"; ExpectedVersions=@("1.0.0.0", "3.0.0.0", "5.0.0.0"); Reason="validate version, exact range inclusive"},
Expand Down
Loading