File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/ResourceManager/OperationalInsights
Commands.OperationalInsights.Test/ScenarioTests
Commands.OperationalInsights/Models Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ function Test-SearchGetSearchResultsAndUpdate
30
30
Assert-NotNull $searchResult.Value
31
31
Assert-AreEqual $searchResult.Value.Count $top
32
32
33
+ # Makesure we return each doc as string for backward compatiable.
34
+ $stringType = " string" .GetType()
35
+ $valueType = $searchResult.Value.GetType ()
36
+ $valueIsString = $valueType.GenericTypeArguments.Contains ($stringType )
37
+ Assert-AreEqual $true $valueIsString
38
+
33
39
$idArray = $searchResult.Id.Split (" /" )
34
40
$id = $idArray [$idArray.Length - 1 ]
35
41
$updatedResult = Get-AzureRmOperationalInsightsSearchResults - ResourceGroupName $rgname - WorkspaceName $wsname - Id $id
Original file line number Diff line number Diff line change 14
14
15
15
using Microsoft . Azure . Management . OperationalInsights . Models ;
16
16
using System ;
17
+ using System . Linq ;
17
18
using System . Collections . Generic ;
18
19
19
20
namespace Microsoft . Azure . Commands . OperationalInsights . Models
@@ -30,7 +31,7 @@ public PSSearchGetSearchResultsResponse(SearchResultsResponse response)
30
31
{
31
32
this . Id = response . Id ;
32
33
this . Metadata = new PSSearchMetadata ( response . Metadata ) ;
33
- this . Value = response . Value ;
34
+ this . Value = response . Value . Select ( jObj => jObj . ToString ( ) ) . ToList ( ) ;
34
35
35
36
if ( response . Error != null )
36
37
{
You can’t perform that action at this time.
0 commit comments