@@ -1573,7 +1573,6 @@ function Test-VirtualNetworkEncryption
15731573 Assert-AreEqual " dropUnencrypted" $vnet2.Encryption.Enforcement
15741574
15751575 # Update the encryption policies on both virtual networks
1576- $vnet1.Encryption.Enabled = " false"
15771576 $vnet1.Encryption.Enforcement = " allowUnencrypted"
15781577 $vnet2.Encryption.Enforcement = " allowUnencrypted"
15791578 $updateVnet1Job = $vnet1 | Set-AzVirtualNetwork - AsJob
@@ -1586,7 +1585,7 @@ function Test-VirtualNetworkEncryption
15861585 # Perform GET operations to retrieve both virtual networks and verify that the encryption property is set to the expected value
15871586 $vnet1 = Get-AzVirtualNetwork - Name $vnet1Name - ResourceGroupName $rgname
15881587 $vnet2 = Get-AzVirtualNetwork - Name $vnet2Name - ResourceGroupName $rgname
1589- Assert-AreEqual " false " $vnet1.Encryption.Enabled
1588+ Assert-AreEqual " true " $vnet1.Encryption.Enabled
15901589 Assert-AreEqual " true" $vnet2.Encryption.Enabled
15911590 Assert-AreEqual " allowUnencrypted" $vnet1.Encryption.Enforcement
15921591 Assert-AreEqual " allowUnencrypted" $vnet2.Encryption.Enforcement
@@ -1616,15 +1615,15 @@ function Test-VirtualNetworkEncryption
16161615 $vnet1 = Get-AzVirtualNetwork - Name $vnet1Name - ResourceGroupName $rgname
16171616 $vnet2 = Get-AzVirtualNetwork - Name $vnet2Name - ResourceGroupName $rgname
16181617 Assert-AreEqual " true" $vnet1.VirtualNetworkPeerings [0 ].RemoteVirtualNetworkEncryption.Enabled
1619- Assert-AreEqual " false " $vnet2.VirtualNetworkPeerings [0 ].RemoteVirtualNetworkEncryption.Enabled
1618+ Assert-AreEqual " true " $vnet2.VirtualNetworkPeerings [0 ].RemoteVirtualNetworkEncryption.Enabled
16201619 Assert-AreEqual " allowUnencrypted" $vnet2.VirtualNetworkPeerings [0 ].RemoteVirtualNetworkEncryption.Enforcement
16211620 Assert-AreEqual " allowUnencrypted" $vnet1.VirtualNetworkPeerings [0 ].RemoteVirtualNetworkEncryption.Enforcement
16221621
16231622 # Get Peering to confirm the RemoteVirtualNetworkEncryption property
16241623 $peering1 = Get-AzVirtualNetworkPeering - Name $peering1Name - VirtualNetwork $vnet1Name - ResourceGroupName $rgname
16251624 $peering2 = Get-AzVirtualNetworkPeering - Name $peering2Name - VirtualNetwork $vnet2Name - ResourceGroupName $rgname
16261625 Assert-AreEqual " true" $peering1.RemoteVirtualNetworkEncryption.Enabled
1627- Assert-AreEqual " false " $peering2.RemoteVirtualNetworkEncryption.Enabled
1626+ Assert-AreEqual " true " $peering2.RemoteVirtualNetworkEncryption.Enabled
16281627 Assert-AreEqual " allowUnencrypted" $peering1.RemoteVirtualNetworkEncryption.Enforcement
16291628 Assert-AreEqual " allowUnencrypted" $peering2.RemoteVirtualNetworkEncryption.Enforcement
16301629 }
0 commit comments