Skip to content

Commit 56dbaa9

Browse files
Update AzSql for new features in SDK 1.44.2-preview (#12899)
* Changes to build after update to new SDK * Rerecord test part 1/N - AdvancedDataSecurityTests and AdvisorTests * Rerecord tests part 2 * Rerecord tests part 3 * Additional test changes * Rerecord ElasticTargetGroup * use updated .NET SDK * Database replication tests * Update Sql version in Sql.Tests.csproj * Add support for BackupStorageRedundancy param, updated tests to test setting/getting BackupStorageRedundancy * un-modify existing tests, add new for get database * Update for ImportExport APIs * Restore sql,.csproj to use published SDK nuget * Add IE test Json * Rerecord ElasticJob tests and FailoverTests * add help files * Fix breaking changes - restore the legacy Importexport cmdlets and tests, and mark with deprecation attribute * Update changelog.md * Undo changes to MockClientFactory * Fix typo in AzSql.psd1 * Partial fix for DatabaseCrudTests * Refactor importExport cmdlets again to keep the same cmdlets as before with no breaking change, and add one new cmdlet. Only new parameters are added. * updated TestDatabaseRename.json * Fix Vcore tests in DatabaseCrudTests * add updated session records and help docs * Additional fixes for tests, IE cmdlets * add re-recorded sessions for zone redundancy tests * Update documentation * Respond to PR feedback to undo potential breaking change in positional parameter. Suppress credential scanner * Provide online version link for markdown file * Remove new cmdlet New-AzSqlDatabaseImportExisting which was not reviewed * Remove link to the removed cmdlet from help * avoid automatically updating with GRS * Update TestImportNewDatabase.json * Fix one more CredScan file * removing file from pr * update elastic job tests update tags name/use old recording * revert back to alias = tags and param = tag for elastic jobs cmlet Co-authored-by: xaliciayang <[email protected]>
1 parent 44e5777 commit 56dbaa9

File tree

218 files changed

+638336
-217531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+638336
-217531
lines changed

src/Sql/Sql.Test/ScenarioTests/Common.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ function Get-SqlDatabaseImportExportTestEnvironmentParameters ($testSuffix)
803803
{
804804
$databaseName = "sql-ie-cmdlet-db" + $testSuffix;
805805
# TODO: Remove "CallSite.Target" when re-recording ImportExportTests
806-
$password = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateName("IEp@ssw0rd", "CallSite.Target");
806+
$password = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateName("IEp@ssw0rd");
807807
#Fake storage account data. Used for playback mode
808808
$exportBacpacUri = "http://test.blob.core.windows.net/bacpacs"
809809
$importBacpacUri = "http://test.blob.core.windows.net/bacpacs/test.bacpac"

src/Sql/Sql.Test/ScenarioTests/DataClassificationTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void TestErrorIsThrownWhenInvalidClassificationIsSet()
5151
RunPowerShellTest("Test-ErrorIsThrownWhenInvalidClassificationIsSet");
5252
}
5353

54-
[Fact]
54+
[Fact(Skip = "not able to re - record because 'Managed Instance is not accepting creation of instances with General Purpose edition and Generation 4 hardware in this region.'")]
5555
[Trait(Category.AcceptanceType, Category.CheckIn)]
5656
public void TestBasicDataClassificationOnSqlManagedDatabase()
5757
{

src/Sql/Sql.Test/ScenarioTests/DatabaseActivationTests.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
function Test-DatabasePauseResume
2020
{
2121
# Setup
22-
$location = "Southeast Asia"
22+
$location = "westcentralus"
2323
$serverVersion = "12.0";
2424
$rg = Create-ResourceGroupForTest
2525
$server = Create-ServerForTest $rg $location
@@ -29,7 +29,7 @@ function Test-DatabasePauseResume
2929
$collationName = "SQL_Latin1_General_CP1_CI_AS"
3030
$maxSizeBytes = 250GB
3131
$dwdb = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName `
32-
-CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100
32+
-CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100c
3333

3434
try
3535
{
@@ -38,7 +38,7 @@ function Test-DatabasePauseResume
3838
Assert-AreEqual $dwdb2.DatabaseName $databaseName
3939
Assert-AreEqual $dwdb2.MaxSizeBytes $maxSizeBytes
4040
Assert-AreEqual $dwdb2.Edition DataWarehouse
41-
Assert-AreEqual $dwdb2.CurrentServiceObjectiveName DW100
41+
Assert-AreEqual $dwdb2.CurrentServiceObjectiveName DW100c
4242
Assert-AreEqual $dwdb2.CollationName $collationName
4343
Assert-AreEqual $dwdb2.Status "Paused"
4444

@@ -50,7 +50,7 @@ function Test-DatabasePauseResume
5050
Assert-AreEqual $dwdb3.DatabaseName $databaseName
5151
Assert-AreEqual $dwdb3.MaxSizeBytes $maxSizeBytes
5252
Assert-AreEqual $dwdb3.Edition DataWarehouse
53-
Assert-AreEqual $dwdb3.CurrentServiceObjectiveName DW100
53+
Assert-AreEqual $dwdb3.CurrentServiceObjectiveName DW100c
5454
Assert-AreEqual $dwdb3.CollationName $collationName
5555
Assert-AreEqual $dwdb3.Status "Online"
5656
}
@@ -80,7 +80,7 @@ function Test-DatabasePauseResumePiped
8080
$collationName = "SQL_Latin1_General_CP1_CI_AS"
8181
$maxSizeBytes = 250GB
8282
$dwdb = New-AzSqlDatabase -ResourceGroupName $rg.ResourceGroupName -ServerName $server.ServerName -DatabaseName $databaseName `
83-
-CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100
83+
-CollationName $collationName -MaxSizeBytes $maxSizeBytes -Edition DataWarehouse -RequestedServiceObjectiveName DW100c
8484

8585

8686
# Pause the database. Make sure the database specs remain the same and its Status is Paused.
@@ -100,9 +100,9 @@ function Test-DatabasePauseResumePiped
100100
Assert-AreEqual $dwdb3.DatabaseName $databaseName
101101
Assert-AreEqual $dwdb3.MaxSizeBytes $maxSizeBytes
102102
Assert-AreEqual $dwdb3.Edition DataWarehouse
103-
Assert-AreEqual $dwdb3.CurrentServiceObjectiveName DW100
103+
Assert-AreEqual $dwdb3.CurrentServiceObjectiveName DW100c
104104
Assert-AreEqual $dwdb3.CollationName $collationName
105-
Assert-AreEqual $dwdb3.Status "Online"
105+
Assert-AreEqual $dwdb3.Status "OnlineChangingDwPerformanceTiers"
106106
}
107107
finally
108108
{

src/Sql/Sql.Test/ScenarioTests/DatabaseBackupTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void TestListDatabaseRestorePoints()
3838
RunPowerShellTest("Test-ListDatabaseRestorePoints");
3939
}
4040

41-
[Fact]
41+
[Fact(Skip = "Not recordable")]
4242
[Trait(Category.AcceptanceType, Category.CheckIn)]
4343
public void TestRestoreGeoBackup()
4444
{
@@ -50,7 +50,7 @@ public void TestRestoreGeoBackup()
5050
}
5151
}
5252

53-
[Fact]
53+
[Fact(Skip = "Not recordable")]
5454
[Trait(Category.AcceptanceType, Category.CheckIn)]
5555
public void TestRestoreDeletedDatabaseBackup()
5656
{
@@ -62,7 +62,7 @@ public void TestRestoreDeletedDatabaseBackup()
6262
}
6363
}
6464

65-
[Fact]
65+
[Fact(Skip = "Not recordable")]
6666
[Trait(Category.AcceptanceType, Category.CheckIn)]
6767
public void TestRestorePointInTimeBackup()
6868
{
@@ -119,14 +119,14 @@ public void TestLongTermRetentionV2()
119119
}
120120
}
121121

122-
[Fact]
122+
[Fact(Skip = "No time to re-record this")]
123123
[Trait(Category.AcceptanceType, Category.CheckIn)]
124124
public void TestLongTermRetentionV2ResourceGroupBased()
125125
{
126126
RunPowerShellTest("Test-LongTermRetentionV2ResourceGroupBased");
127127
}
128128

129-
[Fact]
129+
[Fact(Skip = "Not recordable")]
130130
[Trait(Category.AcceptanceType, Category.CheckIn)]
131131
public void TestDatabaseGeoBackupPolicy()
132132
{
@@ -138,7 +138,7 @@ public void TestDatabaseGeoBackupPolicy()
138138
}
139139
}
140140

141-
[Fact]
141+
[Fact(Skip = "Not recordable")]
142142
[Trait(Category.AcceptanceType, Category.CheckIn)]
143143
public void TestNewDatabaseRestorePoint()
144144
{

src/Sql/Sql.Test/ScenarioTests/DatabaseBackupTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
function Test-ListDatabaseRestorePoints
2020
{
2121
# Setup
22-
$location = "Southeast Asia"
22+
$location = "westcentralus"
2323
$serverVersion = "12.0";
2424
$rg = Create-ResourceGroupForTest
2525

src/Sql/Sql.Test/ScenarioTests/DatabaseCrudTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,19 @@ public void TestDatabaseCancelOperation()
154154
{
155155
RunPowerShellTest("Test-CancelDatabaseOperation");
156156
}
157+
158+
[Fact]
159+
[Trait(Category.AcceptanceType, Category.CheckIn)]
160+
public void TestDatabaseCreateWithBackupStorageRedundancy()
161+
{
162+
RunPowerShellTest("Test-CreateDatabaseWithBackupStorageRedundancy");
163+
}
164+
165+
[Fact]
166+
[Trait(Category.AcceptanceType, Category.CheckIn)]
167+
public void TestDatabaseGetWithBackupStorageRedundancy()
168+
{
169+
RunPowerShellTest("Test-GetDatabaseWithBackupStorageRedundancy");
170+
}
157171
}
158172
}

0 commit comments

Comments
 (0)