File tree Expand file tree Collapse file tree 7 files changed +1
-12380
lines changed
src/ResourceManager/Sql/Commands.Sql.Test
Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AdvisorTests
Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ElasticPoolCrudTests Expand file tree Collapse file tree 7 files changed +1
-12380
lines changed Original file line number Diff line number Diff line change 421
421
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AdvisorTests\TestUpdateDatabaseAdvisor.json" >
422
422
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
423
423
</None >
424
- <None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AdvisorTests\TestUpdateElasticPoolAdvisor.json" >
425
- <CopyToOutputDirectory >Always</CopyToOutputDirectory >
426
- </None >
427
424
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.AdvisorTests\TestUpdateServerAdvisor.json" >
428
425
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
429
426
</None >
622
619
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ElasticPoolCrudTests\TestElasticPoolGet.json" >
623
620
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
624
621
</None >
625
- <None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ElasticPoolCrudTests\TestElasticPoolMetricGet.json" >
626
- <CopyToOutputDirectory >Always</CopyToOutputDirectory >
627
- </None >
628
622
<None Include =" SessionRecords\Microsoft.Azure.Commands.Sql.Test.ScenarioTests.ElasticPoolCrudTests\TestElasticPoolRemove.json" >
629
623
<CopyToOutputDirectory >Always</CopyToOutputDirectory >
630
624
</None >
Original file line number Diff line number Diff line change @@ -113,13 +113,6 @@ public void TestGetElasticPoolAdvisor()
113
113
RunPowerShellTest ( "Test-GetElasticPoolAdvisor" ) ;
114
114
}
115
115
116
- [ Fact ( Skip = "Fails when run live due to HTTP 500 error on PATCH .../Microsoft.Sql/servers/{serverName}/elasticPools/{poolName}/advisors/CreateIndex?api-version=2015-05-01-preview" ) ]
117
- [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
118
- public void TestUpdateElasticPoolAdvisor ( )
119
- {
120
- RunPowerShellTest ( "Test-UpdateElasticPoolAdvisor" ) ;
121
- }
122
-
123
116
#endregion
124
117
}
125
118
}
Original file line number Diff line number Diff line change @@ -336,35 +336,6 @@ function Test-GetElasticPoolAdvisor
336
336
}
337
337
}
338
338
339
- <#
340
- . SYNOPSIS
341
- Tests updating a elastic pool advisor
342
- #>
343
- function Test-UpdateElasticPoolAdvisor
344
- {
345
- # Setup
346
- $rg = Create- ResourceGroupForTest
347
- $ep = SetupElasticPool $rg
348
-
349
- try
350
- {
351
- $response = Set-AzureRmSqlElasticPoolAdvisorAutoExecuteStatus `
352
- - ResourceGroupName $ep.ResourceGroupName `
353
- - ServerName $ep.ServerName `
354
- - ElasticPoolName $ep.ElasticPoolName `
355
- - AdvisorName CreateIndex `
356
- - AutoExecuteStatus Disabled
357
- Assert-NotNull $response
358
- ValidateElasticPool $response $ep
359
- ValidateAdvisorProperties $response
360
- }
361
- finally
362
- {
363
- # Cleanup
364
- Remove-ResourceGroupForTest $rg
365
- }
366
- }
367
-
368
339
<#
369
340
. SYNOPSIS
370
341
Setup Server for tests
Original file line number Diff line number Diff line change 13
13
// ----------------------------------------------------------------------------------
14
14
15
15
using Microsoft . Azure . Commands . ScenarioTest . SqlTests ;
16
- using Microsoft . Azure . ServiceManagemenet . Common . Models ;
17
- using Microsoft . Azure . Test . HttpRecorder ;
18
16
using Microsoft . WindowsAzure . Commands . ScenarioTest ;
19
- using Microsoft . WindowsAzure . Commands . Utilities . Common ;
17
+ using RestTestFramework = Microsoft . Rest . ClientRuntime . Azure . TestFramework ;
20
18
using Xunit ;
21
19
using Xunit . Abstractions ;
22
20
@@ -49,17 +47,6 @@ public void TestElasticPoolGet()
49
47
RunPowerShellTest ( "Test-GetElasticPool" ) ;
50
48
}
51
49
52
- [ Fact ]
53
- [ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
54
- public void TestElasticPoolMetricGet ( )
55
- {
56
- // Test cannot be re-recorded because it has hardcoded server name
57
- if ( TestMockSupport . RunningMocked )
58
- {
59
- RunPowerShellTest ( "Test-GetElasticPoolMetric" ) ;
60
- }
61
- }
62
-
63
50
[ Fact ]
64
51
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
65
52
public void TestElasticPoolRemove ( )
Original file line number Diff line number Diff line change @@ -146,33 +146,6 @@ function Test-GetElasticPool
146
146
}
147
147
}
148
148
149
- <#
150
- . SYNOPSIS
151
- Tests getting an elastic pool metric
152
- #>
153
- function Test-GetElasticPoolMetric
154
- {
155
- # This test requires that an elastic pool has been created and has metrics ready
156
- # To prevent requiring putting something like a Sleep(10 minutes) in the code
157
- # this test requires the server/elastic pool be pre-created with metrics data available.
158
-
159
- # Setup and retrieve the existing pool
160
- $rgName = " test-group"
161
- $serverName = " groupserver1"
162
- $elasticPoolName = " testpool2"
163
-
164
- $ep1 = Get-AzureRmSqlElasticPool - ServerName $serverName - ResourceGroupName $rgName `
165
- - ElasticPoolName $elasticPoolName
166
- Assert-NotNull $ep1
167
-
168
- # Get pool metrics with all values
169
- # Introducing breaking change that requires -MetricNames csv-list as parameter for this call (disabling this part of the test as done before)
170
- # $metrics = $ep1 | Get-AzureRmMetric -TimeGrain "0:5:0" -StartTime "2015-04-22T16:00:00Z" -EndTime "2015-04-22T17:00:00Z"
171
- # Assert-NotNull $metrics
172
- # Assert-True { $metrics.Count -gt 0 }
173
- }
174
-
175
-
176
149
<#
177
150
. SYNOPSIS
178
151
Tests removing an elastic pool
You can’t perform that action at this time.
0 commit comments