Skip to content

Commit 46542d2

Browse files
committed
added all missing tests and recordings
1 parent d789f2f commit 46542d2

17 files changed

+1069
-81
lines changed

src/OperationalInsights/OperationalInsights.Autorest/test/Get-AzOperationalInsightsTable.Recording.json

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

src/OperationalInsights/OperationalInsights.Autorest/test/Get-AzOperationalInsightsTable.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ Describe 'Get-AzOperationalInsightsTable' {
2323
}
2424
It 'List' {
2525
$allTablesForWs = Get-AzOperationalInsightsTable -ResourceGroupName $rgName -WorkspaceName $wsName
26-
Write-Host -ForegroundColor Yellow "Get-AzOperationalInsightsTable List rturned with: $($allTablesForWs.Count) results"
26+
Write-Host -ForegroundColor Yellow "Get-AzOperationalInsightsTable List returned with: $($allTablesForWs.Count) results"
2727
$allTablesForWs.Count | Should BeGreaterThan 0
2828
}
2929

3030
It 'Get' {
31-
$allTablesForWs = Get-AzOperationalInsightsTable -ResourceGroupName $rgName -WorkspaceName $wsName -TableName $tableName
32-
Write-Host -ForegroundColor Yellow "Get-AzOperationalInsightsTable Get rturned with: $($allTablesForWs.Count) results"
33-
$allTablesForWs.Count | Should BeGreaterThan 0
31+
$table = Get-AzOperationalInsightsTable -ResourceGroupName $rgName -WorkspaceName $wsName -TableName $tableName
32+
Write-Host -ForegroundColor Yellow "Get-AzOperationalInsightsTable Get returned with: $($table.Count) results"
33+
$table.Count | Should BeGreaterThan 0
3434
}
3535

3636
It 'GetViaIdentity' -skip {

src/OperationalInsights/OperationalInsights.Autorest/test/Get-AzOperationalInsightsWorkspace.Recording.json

Lines changed: 23 additions & 23 deletions
Large diffs are not rendered by default.

src/OperationalInsights/OperationalInsights.Autorest/test/New-AzOperationalInsightsTable.Recording.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717
"Headers": {
1818
"Cache-Control": [ "no-cache" ],
1919
"Pragma": [ "no-cache" ],
20-
"Location": [ "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/resourcegroups/dabenham-dev/providers/Microsoft.OperationalInsights/workspaces/dabenham-PSH2/tables/danielKukuTest_CL/operationresults/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2021-12-01-preview" ],
21-
"Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2015-11-01-preview" ],
20+
"Location": [ "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/resourcegroups/dabenham-dev/providers/Microsoft.OperationalInsights/workspaces/dabenham-PSH2/tables/danielKukuTest_CL/operationresults/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2021-12-01-preview" ],
21+
"Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2015-11-01-preview" ],
2222
"X-AMS-APIVersion": [ "WebAPI1.0" ],
2323
"CacheControl": [ "no-cache" ],
24-
"x-ms-request-id": [ "0132aa64-c631-4cb2-ba28-0ba1dd1bb516" ],
24+
"x-ms-request-id": [ "b4eae6ca-8d32-4c21-bc9f-85521bfcae6d" ],
2525
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
2626
"X-Content-Type-Options": [ "nosniff" ],
2727
"Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ],
2828
"X-Powered-By": [ "ASP.NET", "ASP.NET" ],
2929
"x-ms-ratelimit-remaining-subscription-writes": [ "1199" ],
30-
"x-ms-correlation-request-id": [ "5a2da1c5-6386-497a-aa03-f3ba3f948310" ],
31-
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T141442Z:5a2da1c5-6386-497a-aa03-f3ba3f948310" ],
32-
"Date": [ "Mon, 31 Jan 2022 14:14:42 GMT" ]
30+
"x-ms-correlation-request-id": [ "0a0f7241-b1d2-4a49-9b29-7048e7b36838" ],
31+
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T163920Z:0a0f7241-b1d2-4a49-9b29-7048e7b36838" ],
32+
"Date": [ "Mon, 31 Jan 2022 16:39:19 GMT" ]
3333
},
3434
"ContentHeaders": {
3535
"Expires": [ "-1" ],
@@ -39,16 +39,16 @@
3939
"isContentBase64": false
4040
}
4141
},
42-
"New-AzOperationalInsightsTable+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2015-11-01-preview+2": {
42+
"New-AzOperationalInsightsTable+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2015-11-01-preview+2": {
4343
"Request": {
4444
"Method": "GET",
45-
"RequestUri": "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2015-11-01-preview",
45+
"RequestUri": "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2015-11-01-preview",
4646
"Content": null,
4747
"isContentBase64": false,
4848
"Headers": {
4949
"Authorization": [ "[Filtered]" ],
5050
"x-ms-unique-id": [ "7" ],
51-
"x-ms-client-request-id": [ "66fb6910-244d-484a-ab31-9c06158ce6e2" ],
51+
"x-ms-client-request-id": [ "3c8cba81-7ccd-4863-a103-c65b01138499" ],
5252
"CommandName": [ "New-AzOperationalInsightsTable" ],
5353
"FullCommandName": [ "New-AzOperationalInsightsTable_CreateExpanded" ],
5454
"ParameterSetName": [ "__AllParameterSets" ],
@@ -64,35 +64,35 @@
6464
"Pragma": [ "no-cache" ],
6565
"X-AMS-APIVersion": [ "WebAPI1.0" ],
6666
"CacheControl": [ "no-cache" ],
67-
"x-ms-request-id": [ "f04901b2-4629-4d38-9407-a24744c4b74a" ],
67+
"x-ms-request-id": [ "8d57da03-fd65-4e05-9c52-0219a0abd578" ],
6868
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
6969
"X-Content-Type-Options": [ "nosniff" ],
7070
"Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ],
7171
"X-Powered-By": [ "ASP.NET", "ASP.NET" ],
7272
"x-ms-ratelimit-remaining-subscription-reads": [ "11994" ],
73-
"x-ms-correlation-request-id": [ "550ea22b-9610-4744-be16-218b556322d8" ],
74-
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T141512Z:550ea22b-9610-4744-be16-218b556322d8" ],
75-
"Date": [ "Mon, 31 Jan 2022 14:15:12 GMT" ]
73+
"x-ms-correlation-request-id": [ "99d7aaf4-cc14-43a3-a86e-6ff5e5f9c18d" ],
74+
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T163950Z:99d7aaf4-cc14-43a3-a86e-6ff5e5f9c18d" ],
75+
"Date": [ "Mon, 31 Jan 2022 16:39:49 GMT" ]
7676
},
7777
"ContentHeaders": {
7878
"Content-Length": [ "306" ],
7979
"Content-Type": [ "application/json; charset=utf-8" ],
8080
"Expires": [ "-1" ]
8181
},
82-
"Content": "{\r\n \"status\": \"InProgress\",\r\n \"name\": \"6772e57d-7f5b-4609-807c-5b453a6dd9ef\",\r\n \"id\": \"/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef\",\r\n \"startTime\": \"Mon, 31 Jan 2022 14:14:42 GMT\"\r\n}",
82+
"Content": "{\r\n \"status\": \"InProgress\",\r\n \"name\": \"9f325b58-50fb-4827-9ba2-f5cf1c8925fc\",\r\n \"id\": \"/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc\",\r\n \"startTime\": \"Mon, 31 Jan 2022 16:39:19 GMT\"\r\n}",
8383
"isContentBase64": false
8484
}
8585
},
86-
"New-AzOperationalInsightsTable+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2015-11-01-preview+3": {
86+
"New-AzOperationalInsightsTable+[NoContext]+CreateExpanded+$GET+https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2015-11-01-preview+3": {
8787
"Request": {
8888
"Method": "GET",
89-
"RequestUri": "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef?api-version=2015-11-01-preview",
89+
"RequestUri": "https://management.azure.com/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc?api-version=2015-11-01-preview",
9090
"Content": null,
9191
"isContentBase64": false,
9292
"Headers": {
9393
"Authorization": [ "[Filtered]" ],
9494
"x-ms-unique-id": [ "8" ],
95-
"x-ms-client-request-id": [ "66fb6910-244d-484a-ab31-9c06158ce6e2" ],
95+
"x-ms-client-request-id": [ "3c8cba81-7ccd-4863-a103-c65b01138499" ],
9696
"CommandName": [ "New-AzOperationalInsightsTable" ],
9797
"FullCommandName": [ "New-AzOperationalInsightsTable_CreateExpanded" ],
9898
"ParameterSetName": [ "__AllParameterSets" ],
@@ -108,22 +108,22 @@
108108
"Pragma": [ "no-cache" ],
109109
"X-AMS-APIVersion": [ "WebAPI1.0" ],
110110
"CacheControl": [ "no-cache" ],
111-
"x-ms-request-id": [ "2a97ac0d-c6a9-4f0d-9116-971b52a16a75" ],
111+
"x-ms-request-id": [ "2c143b86-af55-4e9b-9cd8-f2118eb43cab" ],
112112
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
113113
"X-Content-Type-Options": [ "nosniff" ],
114114
"Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ],
115115
"X-Powered-By": [ "ASP.NET", "ASP.NET" ],
116116
"x-ms-ratelimit-remaining-subscription-reads": [ "11993" ],
117-
"x-ms-correlation-request-id": [ "9c846246-f540-453e-8217-18ec2d957ef0" ],
118-
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T141543Z:9c846246-f540-453e-8217-18ec2d957ef0" ],
119-
"Date": [ "Mon, 31 Jan 2022 14:15:42 GMT" ]
117+
"x-ms-correlation-request-id": [ "c845428c-43db-4037-be27-5d85ea6b55d8" ],
118+
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T164020Z:c845428c-43db-4037-be27-5d85ea6b55d8" ],
119+
"Date": [ "Mon, 31 Jan 2022 16:40:19 GMT" ]
120120
},
121121
"ContentHeaders": {
122122
"Content-Length": [ "352" ],
123123
"Content-Type": [ "application/json; charset=utf-8" ],
124124
"Expires": [ "-1" ]
125125
},
126-
"Content": "{\r\n \"status\": \"Succeeded\",\r\n \"name\": \"6772e57d-7f5b-4609-807c-5b453a6dd9ef\",\r\n \"id\": \"/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/6772e57d-7f5b-4609-807c-5b453a6dd9ef\",\r\n \"startTime\": \"Mon, 31 Jan 2022 14:14:42 GMT\",\r\n \"endTime\": \"Mon, 31 Jan 2022 14:15:13 GMT\"\r\n}",
126+
"Content": "{\r\n \"status\": \"Succeeded\",\r\n \"name\": \"9f325b58-50fb-4827-9ba2-f5cf1c8925fc\",\r\n \"id\": \"/subscriptions/57947cb5-aadd-4b6c-9e8e-27f545bb7bf5/providers/Microsoft.OperationalInsights/locations/eastus/operationStatuses/9f325b58-50fb-4827-9ba2-f5cf1c8925fc\",\r\n \"startTime\": \"Mon, 31 Jan 2022 16:39:19 GMT\",\r\n \"endTime\": \"Mon, 31 Jan 2022 16:40:06 GMT\"\r\n}",
127127
"isContentBase64": false
128128
}
129129
},
@@ -136,7 +136,7 @@
136136
"Headers": {
137137
"Authorization": [ "[Filtered]" ],
138138
"x-ms-unique-id": [ "9" ],
139-
"x-ms-client-request-id": [ "66fb6910-244d-484a-ab31-9c06158ce6e2" ],
139+
"x-ms-client-request-id": [ "3c8cba81-7ccd-4863-a103-c65b01138499" ],
140140
"CommandName": [ "New-AzOperationalInsightsTable" ],
141141
"FullCommandName": [ "New-AzOperationalInsightsTable_CreateExpanded" ],
142142
"ParameterSetName": [ "__AllParameterSets" ],
@@ -152,15 +152,15 @@
152152
"Pragma": [ "no-cache" ],
153153
"X-AMS-APIVersion": [ "WebAPI1.0" ],
154154
"CacheControl": [ "no-cache" ],
155-
"x-ms-request-id": [ "a2eea2b0-335e-445c-9d87-cff9f400113d" ],
155+
"x-ms-request-id": [ "0696ff37-38e9-4ba0-b684-654570f436bc" ],
156156
"Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ],
157157
"X-Content-Type-Options": [ "nosniff" ],
158158
"Server": [ "Microsoft-IIS/10.0", "Microsoft-IIS/10.0" ],
159159
"X-Powered-By": [ "ASP.NET", "ASP.NET" ],
160160
"x-ms-ratelimit-remaining-subscription-reads": [ "11992" ],
161-
"x-ms-correlation-request-id": [ "8f037a5d-bfc0-4e9b-954f-85d3dacb60f2" ],
162-
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T141544Z:8f037a5d-bfc0-4e9b-954f-85d3dacb60f2" ],
163-
"Date": [ "Mon, 31 Jan 2022 14:15:43 GMT" ]
161+
"x-ms-correlation-request-id": [ "e573e072-705c-4fb1-8291-0f1bafd966c5" ],
162+
"x-ms-routing-request-id": [ "SWITZERLANDNORTH:20220131T164021Z:e573e072-705c-4fb1-8291-0f1bafd966c5" ],
163+
"Date": [ "Mon, 31 Jan 2022 16:40:20 GMT" ]
164164
},
165165
"ContentHeaders": {
166166
"Content-Length": [ "1377" ],

src/OperationalInsights/OperationalInsights.Autorest/test/New-AzOperationalInsightsTable.Tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzOperationalInsightsTabl
1515
}
1616

1717
Describe 'New-AzOperationalInsightsTable' {
18-
BeforeAll {
18+
BeforeAll {
1919
$rgName = "dabenham-dev"
2020
$wsName = "dabenham-PSH2"
2121
$tableName = "danielKukuTest_CL"
@@ -26,6 +26,7 @@ Describe 'New-AzOperationalInsightsTable' {
2626
$schemaColumns = ($col1, $col2)
2727

2828
$table = New-AzOperationalInsightsTable -ResourceGroupName $rgName -WorkspaceName $wsName -Name $tableName -RetentionInDay 33 -TotalRetentionInDay 55 -SchemaName $tableName -SchemaColumn $schemaColumns
29-
Write-Host -ForegroundColor Yellow "New-AzOperationalInsightsTable returned with: $($table)"
29+
$table.RetentionInDay | Should Be 33
30+
$table.TotalRetentionInDay | Should Be 55
3031
}
3132
}

0 commit comments

Comments
 (0)