Skip to content

Commit 617e141

Browse files
Consider adding functionality equivalent to "az webapp vnet-integration" to dump vnet integration info (Azure#21127)
* [AppService]: fix Azure#10665 Consider adding functionality equivalent to "az webapp vnet-integration" to dump vnet integration info * updated changelog.md file * re-recorded the tests * Tests are re-recorded * Certificate tests are re-recorded * Appservice & Accession Restrections Tests are re-recorded * WebApp tests re-recorded * Updated PSSite.cs * BackUp tests are re-recorded * added null check
1 parent 20b9d13 commit 617e141

File tree

70 files changed

+67190
-52730
lines changed

Some content is hidden

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

70 files changed

+67190
-52730
lines changed

src/Websites/Websites.Test/ScenarioTests/CertificatesTests.ps1

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,27 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
14-
14+
#Global variables
15+
$rgname = "RG-PS-UnitTesting"
16+
$appname = "AppService-PS-UnitTesting"
17+
$certName = "psunittesting"
18+
$prodHostname = "psunittesting.com"
19+
$slot = "testslot"
20+
$slotHostname = "testslot.psunittesting.com"
21+
$thumbprint=""
22+
$wname = "PS-AppServices-UnitTesting"
23+
$keyvaultname = "PS-UnitTesting-Keyvault"
24+
$keyvaultcertname = "psunittesting9d3d0603-5c4a-4414-a6e6-8ed93f5dde71"
1525
<#
1626
.SYNOPSIS
1727
Tests creating a new managed cert for app.
1828
#>
1929
function Test-NewAzWebAppCertificate
2030
{
21-
$rgname = "lketmtestantps10"
22-
$appname = "lketmtestantps10"
23-
$certName = "adorenowcert"
24-
$prodHostname = "www.adorenow.net"
31+
$rgname = "RG-PS-UnitTesting"
32+
$appname = "AppService-PS-UnitTesting"
33+
$certName = "psunittesting"
34+
$prodHostname = "psunittesting.com"
2535
$thumbprint=""
2636

2737
try{
@@ -46,12 +56,6 @@ Tests creating a new managed cert for app with SSL binding.
4656
#>
4757
function Test-NewAzWebAppCertificateWithSSLBinding
4858
{
49-
$rgname = "lketmtestantps10"
50-
$appname = "lketmtestantps10"
51-
$prodHostname = "www.adorenow.net"
52-
$certName = "adorenowcert"
53-
$thumbprint=""
54-
5559
try{
5660

5761
$cert=New-AzWebAppCertificate -ResourceGroupName $rgname -Name $certName -WebAppName $appname -HostName $prodHostname -AddBinding
@@ -84,13 +88,6 @@ Tests creating a new managed certfor slot.
8488
function Test-NewAzWebAppCertificateForSlot
8589
{
8690

87-
$rgname = "lketmtestantps10"
88-
$appname = "lketmtestantps10"
89-
$slot = "testslot"
90-
$slotHostname = "testslot.adorenow.net"
91-
$certName = "adorenowcert"
92-
$thumbprint=""
93-
9491
try{
9592

9693
$cert=New-AzWebAppCertificate -ResourceGroupName $rgname -Name $certName -WebAppName $appname -HostName $slotHostname -Slot $slot
@@ -113,13 +110,6 @@ Tests removing a managed cert.
113110
#>
114111
function Test-RemoveAzWebAppCertificate
115112
{
116-
117-
$rgname = "lketmtestantps10"
118-
$appname = "lketmtestantps10"
119-
$prodHostname = "www.adorenow.net"
120-
$certName = "adorenowcert"
121-
$thumbprint=""
122-
123113
try{
124114

125115
$cert=New-AzWebAppCertificate -ResourceGroupName $rgname -Name $certName -WebAppName $appname -HostName $prodHostname
@@ -147,10 +137,6 @@ Tests for importing a keyvaultcertificate to appservice
147137
#>
148138
function Test-ImportAzWebAppKeyVaultCertificate
149139
{
150-
$rgname = "RG-PS-UnitTesting"
151-
$wname = "PS-AppServices-UnitTesting"
152-
$keyvaultname = "PS-UnitTesting-Keyvault"
153-
$keyvaultcertname = "PS-UnitTesting"
154140
try
155141
{
156142
#Setup

src/Websites/Websites.Test/ScenarioTests/SSLBindingTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ assign a custom domain to it and update global variable values.
2020
$rgname = "RG-PS-UnitTesting"
2121
$appname = "AppService-PS-UnitTesting"
2222
$slot = "testslot"
23-
$prodHostname = "www.psunittesting.com"
23+
$prodHostname = "psunittesting.com"
2424
$slotHostname = "testslot.psunittesting.com"
25-
$thumbprint = "210C5A1BBF7BC63F8733C3CB5E612FCFF3643E41"
25+
$thumbprint = "D1E31552350B24D89EEE38265BF1E19EEF698E6D"
2626

2727
<#
2828
.SYNOPSIS

src/Websites/Websites.Test/ScenarioTests/WebAppTests.ps1

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,10 @@ function Test-CreateNewWebAppHyperV
472472
$tier = "PremiumV3"
473473
$apiversion = "2015-08-01"
474474
$resourceType = "Microsoft.Web/sites"
475-
$containerImageName = "dotnetsdktesting.azurecr.io/webapplication3:latest"
476-
$containerRegistryUrl = "https://dotnetsdktesting.azurecr.io"
477-
$containerRegistryUser ="DotNetSDKTesting"
478-
$pass = "q=VAWnvGlmJc35yxD4c+1=os7p4tq5Nd"
475+
$containerImageName = "psunittesting.azurecr.io/webapplication3:latest"
476+
$containerRegistryUrl = "https://psunittesting.azurecr.io"
477+
$containerRegistryUser ="psunittesting"
478+
$pass = "L/kYXsr5m2WtSMWSRxKOcwI0xPJrMmETWpY475GA2i+ACRA2WfC9"
479479
$containerRegistryPassword = ConvertTo-SecureString -String $pass -AsPlainText -Force
480480
$dockerPrefix = "DOCKER|"
481481

@@ -541,10 +541,10 @@ function Test-SetWebAppHyperVCredentials
541541
$tier = "PremiumV3"
542542
$apiversion = "2015-08-01"
543543
$resourceType = "Microsoft.Web/sites"
544-
$containerImageName = "dotnetsdktesting.azurecr.io/webapplication3:latest"
545-
$containerRegistryUrl = "https://dotnetsdktesting.azurecr.io"
546-
$containerRegistryUser = "DotNetSDKTesting"
547-
$pass = "q=VAWnvGlmJc35yxD4c+1=os7p4tq5Nd"
544+
$containerImageName = "psunittesting.azurecr.io/webapplication3:latest"
545+
$containerRegistryUrl = "https://psunittesting.azurecr.io"
546+
$containerRegistryUser = "psunittesting"
547+
$pass = "L/kYXsr5m2WtSMWSRxKOcwI0xPJrMmETWpY475GA2i+ACRA2WfC9"
548548
$containerRegistryPassword = ConvertTo-SecureString -String $pass -AsPlainText -Force
549549
$dockerPrefix = "DOCKER|"
550550

@@ -666,10 +666,10 @@ function Test-EnableContainerContinuousDeploymentAndGetUrl
666666
$tier = "PremiumV3"
667667
$apiversion = "2015-08-01"
668668
$resourceType = "Microsoft.Web/sites"
669-
$containerImageName = "dotnetsdktesting.azurecr.io/webapplication3:latest"
670-
$containerRegistryUrl = "https://dotnetsdktesting.azurecr.io"
671-
$containerRegistryUser = "DotNetSDKTesting"
672-
$pass = "q=VAWnvGlmJc35yxD4c+1=os7p4tq5Nd"
669+
$containerImageName = "psunittesting.azurecr.io/webapplication3:latest"
670+
$containerRegistryUrl = "https://psunittesting.azurecr.io"
671+
$containerRegistryUser = "psunittesting"
672+
$pass = "L/kYXsr5m2WtSMWSRxKOcwI0xPJrMmETWpY475GA2i+ACRA2WfC9"
673673
$containerRegistryPassword = ConvertTo-SecureString -String $pass -AsPlainText -Force
674674
$dockerPrefix = "DOCKER|"
675675
try
@@ -1030,10 +1030,10 @@ function Test-SetAzureStorageWebAppHyperV
10301030
$tier = "PremiumV3"
10311031
$apiversion = "2015-08-01"
10321032
$resourceType = "Microsoft.Web/sites"
1033-
$containerImageName = "dotnetsdktesting.azurecr.io/webapplication3:latest"
1034-
$containerRegistryUrl = "https://dotnetsdktesting.azurecr.io"
1035-
$containerRegistryUser ="DotNetSDKTesting"
1036-
$pass = "q=VAWnvGlmJc35yxD4c+1=os7p4tq5Nd"
1033+
$containerImageName = "psunittesting.azurecr.io/webapplication3:latest"
1034+
$containerRegistryUrl = "https://psunittesting.azurecr.io"
1035+
$containerRegistryUser = "psunittesting"
1036+
$pass = "L/kYXsr5m2WtSMWSRxKOcwI0xPJrMmETWpY475GA2i+ACRA2WfC9"
10371037
$containerRegistryPassword = ConvertTo-SecureString -String $pass -AsPlainText -Force
10381038
$dockerPrefix = "DOCKER|"
10391039
$azureStorageAccountCustomId1 = "mystorageaccount"
@@ -1147,11 +1147,11 @@ function Test-CreateNewWebAppOnAse
11471147
# Setup
11481148
# Creating and provisioning an ASE currently takes 30 mins to an hour, hence this test requires that the ASE & ASP are already created
11491149
# before creating the app on the ASE
1150-
$rgname = ".NETSDKRG"
1150+
$rgname = "RG-PS-UnitTesting"
11511151
$wname = Get-WebsiteName
1152-
$location = "East US"
1153-
$whpName = "DotNet-SDK-ASP"
1154-
$aseName = "dotnetsdkase"
1152+
$location = "Central US"
1153+
$whpName = "ASP-PS-UnitTesting"
1154+
$aseName = "ASE-PS-Unittesting"
11551155
$resourceType = "Microsoft.Web/sites"
11561156
try
11571157
{
@@ -1555,11 +1555,11 @@ Tests Tags are not overridden when calling Set-AzWebApp commandlet
15551555
#>
15561556
function Test-TagsNotRemovedBySetWebApp
15571557
{
1558-
$rgname = "lketmtestantps10"
1559-
$appname = "tagstestantps10" # this is an existing app with existing tags
1558+
$rgname = "RG-PS-UnitTesting"
1559+
$appname = "AppService-PS-UnitTesting" # this is an existing app with existing tags
15601560
$slot = "testslot"
1561-
$aspName = "tagstestAspantps10"
1562-
$aspToMove = "tagstestAsp2antps10"
1561+
$aspName = "ASP-PS-UnitTesting"
1562+
$aspToMove = "ASP-PS-UnitTesting1"
15631563

15641564
$getApp = Get-AzWebApp -ResourceGroupName $rgname -Name $appname
15651565
$getSlot = Get-AzWebAppSlot -ResourceGroupName $rgname -Name $appname -Slot $slot

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestriction.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionDuplicate.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionHttpHeaders.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionScm.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionServiceEndpoint.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionServiceTag.json

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

src/Websites/Websites.Test/SessionRecords/Microsoft.Azure.Commands.Websites.Test.ScenarioTests.AccessRestrictionTests/TestAddWebAppAccessRestrictionSlot.json

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

0 commit comments

Comments
 (0)