@@ -19,8 +19,8 @@ Run simple query
19
19
function Search-AzureRmGraph-Query
20
20
{
21
21
$queryResult = Search-AzGraph ' Resources | where tags != "" | project id, tags, properties | limit 2'
22
-
23
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResult
22
+
23
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResult
24
24
Assert-Null $queryResult.SkipToken
25
25
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResult.Data
26
26
Assert-AreEqual 2 $queryResult.Data.Count
@@ -55,7 +55,7 @@ function Search-AzureRmGraph-PagedQuery
55
55
# Page size was artificially set to 2 rows
56
56
$queryResult = Search-AzGraph " project id" - First 3 - Skip 2
57
57
58
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResult
58
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResult
59
59
Assert-IsInstance System.String $queryResult.SkipToken
60
60
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResult.Data
61
61
Assert-AreEqual 3 $queryResult.Data.Count
@@ -95,17 +95,17 @@ function Search-AzureRmGraph-Subscriptions
95
95
$queryResultOneSub = Search-AzGraph $query - Subscription $testSubId
96
96
$queryResultMultipleSubs = Search-AzGraph $query - Subscription @ ($testSubId , $nonExsitentTestSubId )
97
97
98
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResultSubsFromContext
98
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResultSubsFromContext
99
99
Assert-Null $queryResultSubsFromContext.SkipToken
100
100
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResultSubsFromContext.Data
101
101
Assert-AreEqual $testSubId $queryResultSubsFromContext.Data.subscriptionId
102
102
103
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResultOneSub
103
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResultOneSub
104
104
Assert-Null $queryResultOneSub.SkipToken
105
105
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResultOneSub.Data
106
106
Assert-AreEqual $testSubId $queryResultOneSub.Data.subscriptionId
107
107
108
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResultMultipleSubs
108
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResultMultipleSubs
109
109
Assert-Null $queryResultMultipleSubs.SkipToken
110
110
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResultMultipleSubs.Data
111
111
Assert-AreEqual $testSubId $queryResultMultipleSubs.Data.subscriptionId
@@ -126,12 +126,12 @@ function Search-AzureRmGraph-ManagementGroups
126
126
$queryResultOneMg = Search-AzGraph $query - ManagementGroup $testMgId1
127
127
$queryResultMultipleMgs = Search-AzGraph $query - ManagementGroup @ ($testMgId1 , $testMgId2 , $nonExistentTestMgId ) - AllowPartialScope
128
128
129
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResultOneMg
129
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResultOneMg
130
130
Assert-Null $queryResultOneMg.SkipToken
131
131
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResultOneMg.Data
132
132
Assert-AreEqual $testSubId $queryResultOneMg.Data.subscriptionId
133
133
134
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResultMultipleMgs
134
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResultMultipleMgs
135
135
Assert-Null $queryResultMultipleMgs.SkipToken
136
136
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResultMultipleMgs.Data
137
137
Assert-AreEqual $testSubId $queryResultMultipleMgs.Data.subscriptionId
@@ -145,7 +145,7 @@ function Search-AzureRmGraph-SkipTokenQuery
145
145
{
146
146
$queryResult = Search-AzGraph " project id, properties" - SkipToken " ew0KICAiJGlkIjogIjEiLA0KICAiTWF4Um93cyI6IDMsDQogICJSb3dzVG9Ta2lwIjogMywNCiAgIkt1c3RvQ2x1c3RlclVybCI6ICJodHRwczovL2FyZy1ldXMtc2l4LXNmLmFyZy5jb3JlLndpbmRvd3MubmV0Ig0KfQ=="
147
147
148
- Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse $queryResult
148
+ Assert-IsInstance Microsoft.Azure.Commands.ResourceGraph.Models.PSResourceGraphResponse[ PSObject ] $queryResult
149
149
Assert-IsInstance System.String $queryResult.SkipToken
150
150
Assert-IsInstance System.Collections.Generic.List[PSObject ] $queryResult.Data
151
151
Assert-AreEqual 3 $queryResult.Data.Count
0 commit comments