Skip to content

Commit 72b931c

Browse files
committed
Addressing Comments and Re-recording the tests
1 parent 5f432c8 commit 72b931c

File tree

3 files changed

+266
-611
lines changed

3 files changed

+266
-611
lines changed

src/Sql/Sql.Test/ScenarioTests/ManagedInstanceCrudScenarioTests.ps1

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function Test-CreateManagedInstance
2222
{
2323
# Setup
2424
$rg = Create-ResourceGroupForTest
25-
$vnetName = "cl_initial"
26-
$subnetName = "CooL"
25+
$vnetName = "vnet-newprovisioningtest3"
26+
$subnetName = "ManagedInstance"
2727

2828
$managedInstanceName = Get-ManagedInstanceName
2929
$version = "12.0"
@@ -35,11 +35,10 @@ function Test-CreateManagedInstance
3535
$collation = "Serbian_Cyrillic_100_CS_AS"
3636
$timezoneId = "Central Europe Standard Time"
3737
$proxyOverride = "Proxy"
38-
3938
try
4039
{
4140
# Setup VNET
42-
$virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location
41+
$virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location "newprovisioningtest"
4342
$subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq $subnetName }).Id
4443

4544
# With SKU name specified
@@ -64,11 +63,13 @@ function Test-CreateManagedInstance
6463
Assert-AreEqual $managedInstance1.PublicDataEndpointEnabled $true
6564
Assert-AreEqual $managedInstance1.ProxyOverride $proxyOverride
6665
Assert-StartsWith ($managedInstance1.ManagedInstanceName + ".") $managedInstance1.FullyQualifiedDomainName
66+
Assert-NotNull $managedInstance1.DnsZone
6767

6868
$edition = "GeneralPurpose"
6969
$computeGeneration = "Gen4"
7070
$managedInstanceName = Get-ManagedInstanceName
7171
$dnsZonePartner = $managedInstance1.ResourceId
72+
$originalDnsZone = $managedInstance1.DnsZone
7273

7374
# With edition and computeGeneration specified
7475
$job = New-AzSqlInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName `
@@ -87,6 +88,7 @@ function Test-CreateManagedInstance
8788
Assert-AreEqual $managedInstance1.VCores $vCore
8889
Assert-AreEqual $managedInstance1.StorageSizeInGB $storageSizeInGB
8990
Assert-StartsWith ($managedInstance1.ManagedInstanceName + ".") $managedInstance1.FullyQualifiedDomainName
91+
Assert-AreEqual $managedInstance1.DnsZone $originalDnsZone
9092
}
9193
finally
9294
{
@@ -104,11 +106,11 @@ function Test-SetManagedInstance
104106
{
105107
# Setup
106108
$rg = Create-ResourceGroupForTest
107-
$vnetName = "cl_initial"
108-
$subnetName = "CooL"
109+
$vnetName = "vnet-newprovisioningtest3"
110+
$subnetName = "ManagedInstance"
109111

110112
# Setup VNET
111-
$virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location
113+
$virtualNetwork1 = CreateAndGetVirtualNetworkForManagedInstance $vnetName $subnetName $rg.Location "newprovisioningtest"
112114
$subnetId = $virtualNetwork1.Subnets.where({ $_.Name -eq $subnetName }).Id
113115

114116
$managedInstance = Create-ManagedInstanceForTest $rg $subnetId

0 commit comments

Comments
 (0)