Skip to content

Commit b423e68

Browse files
author
Maddie Clayton
authored
Merge pull request #7394 from Azure/FrontDoor
PowerShell integration for Front Door service
2 parents 485bf04 + 308b33c commit b423e68

File tree

101 files changed

+24437
-0
lines changed

Some content is hidden

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

101 files changed

+24437
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="$(ProjectDir)..\..\..\..\tools\Common.Netcore.Dependencies.Test.targets" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>netcoreapp2.1</TargetFramework>
7+
<AssemblyName>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</AssemblyName>
8+
<RootNamespace>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</RootNamespace>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
10+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11+
<WarningsAsErrors />
12+
</PropertyGroup>
13+
14+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
15+
<DelaySign>false</DelaySign>
16+
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
20+
<SignAssembly>true</SignAssembly>
21+
<DelaySign>true</DelaySign>
22+
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
23+
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
24+
</PropertyGroup>
25+
26+
<ItemGroup>
27+
<PackageReference Include="Microsoft.Azure.Management.FrontDoor" Version="0.9.0-preview" />
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<None Update="SessionRecords\**\*.json">
32+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
33+
</None>
34+
<None Update="ScenarioTests\*.ps1">
35+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
36+
</None>
37+
</ItemGroup>
38+
39+
</Project>
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\..\..\tools\Common.Dependencies.Test.targets" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{5E5BBB82-2D69-4A12-93AA-E5753F87AF03}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</RootNamespace>
12+
<AssemblyName>Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests</AssemblyName>
13+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<TargetFrameworkProfile />
16+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
17+
<RestorePackages>true</RestorePackages>
18+
<NuGetPackageImportStamp>a5adf578</NuGetPackageImportStamp>
19+
</PropertyGroup>
20+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
<Prefer32Bit>false</Prefer32Bit>
29+
</PropertyGroup>
30+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
<Prefer32Bit>false</Prefer32Bit>
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<None Include="MSSharedLibKey.snk" />
41+
<Compile Include="Properties\AssemblyInfo.cs" />
42+
<None Include="packages.config" />
43+
<None Include="ScenarioTests\Common.ps1">
44+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
45+
</None>
46+
<None Include="ScenarioTests\WebApplicationFireWallPolicyTests.ps1">
47+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
48+
</None>
49+
<None Include="ScenarioTests\FrontDoorTests.ps1">
50+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
51+
</None>
52+
<None Include="SessionRecords\Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest.FrontDoorTests\TestFrontDoorCrud.json">
53+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
54+
</None>
55+
<None Include="SessionRecords\Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest.FrontDoorTests\TestFrontDoorCrudWithPiping.json">
56+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
57+
</None>
58+
<None Include="SessionRecords\Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest.WebApplicationFireWallPolicyTests\TestPolicyCrud.json">
59+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
60+
</None>
61+
<None Include="SessionRecords\Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest.WebApplicationFireWallPolicyTests\TestPolicyCrudWithPiping.json">
62+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
63+
</None>
64+
</ItemGroup>
65+
<ItemGroup>
66+
<ProjectReference Include="..\Commands.FrontDoor\Commands.FrontDoor.csproj">
67+
<Project>{42656543-77ad-4968-ba4b-be0778705625}</Project>
68+
<Name>Commands.FrontDoor</Name>
69+
</ProjectReference>
70+
</ItemGroup>
71+
<ItemGroup>
72+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
73+
</ItemGroup>
74+
<ItemGroup>
75+
<Compile Include="ScenarioTests\WebApplicationFireWallPolicyTests.cs" />
76+
<Compile Include="ScenarioTests\FrontDoorTests.cs" />
77+
<Compile Include="ScenarioTests\TestController.cs" />
78+
</ItemGroup>
79+
<ItemGroup>
80+
<Reference Include="Microsoft.Azure.Management.FrontDoor, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.FrontDoor.0.9.0-preview\lib\net452\Microsoft.Azure.Management.FrontDoor.dll</HintPath>
82+
</Reference>
83+
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.14\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
85+
</Reference>
86+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.16\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
88+
</Reference>
89+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
90+
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
91+
</Reference>
92+
<Reference Include="System.Runtime" />
93+
</ItemGroup>
94+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
95+
</Project>
Binary file not shown.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Reflection;
16+
using System.Runtime.InteropServices;
17+
using Xunit;
18+
19+
// General Information about an assembly is controlled through the following
20+
// set of attributes. Change these attribute values to modify the information
21+
// associated with an assembly.
22+
[assembly: AssemblyTitle("Microsoft.Azure.Commands.FrontDoor.Test")]
23+
[assembly: AssemblyDescription("")]
24+
[assembly: AssemblyConfiguration("")]
25+
[assembly: AssemblyCompany("")]
26+
[assembly: AssemblyProduct("Microsoft.Azure.Commands.FrontDoor.Test")]
27+
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
28+
[assembly: AssemblyTrademark("")]
29+
[assembly: AssemblyCulture("")]
30+
31+
// Setting ComVisible to false makes the types in this assembly not visible
32+
// to COM components. If you need to access a type in this assembly from
33+
// COM, set the ComVisible attribute to true on that type.
34+
[assembly: ComVisible(false)]
35+
36+
// The following GUID is for the ID of the typelib if this project is exposed to COM
37+
[assembly: Guid("91832aaa-dc11-4583-8239-adb7df531604")]
38+
39+
// Version information for an assembly consists of the following four values:
40+
//
41+
// Major Version
42+
// Minor Version
43+
// Build Number
44+
// Revision
45+
//
46+
// You can specify all the values or you can default the Build and Revision Numbers
47+
// by using the '*' as shown below:
48+
[assembly: AssemblyVersion("0.1.0")]
49+
[assembly: AssemblyFileVersion("0.1.0")]
50+
[assembly: CollectionBehavior(DisableTestParallelization = true)]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.SYNOPSIS
17+
Gets valid resource group name
18+
#>
19+
function Get-ResourceGroupName
20+
{
21+
return getAssetName
22+
}
23+
24+
<#
25+
.SYNOPSIS
26+
Gets valid resource name
27+
#>
28+
function Get-ResourceName
29+
{
30+
return getAssetName
31+
}
32+
33+
<#
34+
.SYNOPSIS
35+
Creates a resource group to use in tests
36+
#>
37+
function TestSetup-CreateResourceGroup
38+
{
39+
$resourceGroupName = getAssetName
40+
$rglocation = Get-Location "Microsoft.Resources" "resourceGroups" "West US"
41+
$resourceGroup = New-AzureRmResourceGroup -Name $resourceGroupName -location $rglocation -Force
42+
return $resourceGroup
43+
}
44+
45+
<#
46+
.SYNOPSIS
47+
Asserts if two tags are equal
48+
#>
49+
function Assert-Tags($tags1, $tags2)
50+
{
51+
if($tags1.count -ne $tags2.count)
52+
{
53+
throw "Tag size not equal. Tag1: $tags1.count Tag2: $tags2.count"
54+
}
55+
56+
foreach($key in $tags1.Keys)
57+
{
58+
if($tags1[$key] -ne $tags2[$key])
59+
{
60+
throw "Tag content not equal. Key:$key Tags1:" + $tags1[$key] + "Tags2:" + $tags2[$key]
61+
}
62+
}
63+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest;
16+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
17+
using Xunit;
18+
19+
namespace Microsoft.Azure.Commands.FrontDoor.Test.ScenarioTests.ScenarioTest
20+
{
21+
public class FrontDoorTests
22+
{
23+
private ServiceManagemenet.Common.Models.XunitTracingInterceptor _logger;
24+
25+
public FrontDoorTests(Xunit.Abstractions.ITestOutputHelper output)
26+
{
27+
_logger = new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output);
28+
ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(_logger);
29+
}
30+
31+
[Fact]
32+
[Trait(Category.AcceptanceType, Category.CheckIn)]
33+
public void TestFrontDoorCrud()
34+
{
35+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-FrontDoorCrud");
36+
}
37+
38+
[Fact]
39+
[Trait(Category.AcceptanceType, Category.CheckIn)]
40+
public void TestFrontDoorCrudWithPiping()
41+
{
42+
TestController.NewInstance.RunPowerShellTest(_logger, "Test-FrontDoorCrudWithPiping");
43+
}
44+
}
45+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.SYNOPSIS
17+
Full Front Door CRUD cycle
18+
#>
19+
function Test-FrontDoorCrud
20+
{
21+
$Name = getAssetName
22+
$resourceGroup = TestSetup-CreateResourceGroup
23+
$resourceGroupName = $resourceGroup.ResourceGroupName
24+
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
25+
$hostName = "$Name.azurefd.net"
26+
$routingrule1 = New-AzureRmFrontDoorRoutingRuleObject -Name "routingrule1" -FrontDoorName $Name -ResourceGroupName $resourceGroupName -FrontendEndpointName "frontendEndpoint1" -BackendPoolName "backendPool1"
27+
$backend1 = New-AzureRmFrontDoorBackendObject -Address "contoso1.azurewebsites.net"
28+
$healthProbeSetting1 = New-AzureRmFrontDoorHealthProbeSettingObject -Name "healthProbeSetting1"
29+
$loadBalancingSetting1 = New-AzureRmFrontDoorLoadBalancingSettingObject -Name "loadbalancingsetting1"
30+
$frontendEndpoint1 = New-AzureRmFrontDoorFrontendEndpointObject -Name "frontendendpoint1" -HostName $hostName
31+
$backendpool1 = New-AzureRmFrontDoorBackendPoolObject -Name "backendpool1" -FrontDoorName $Name -ResourceGroupName $resourceGroupName -Backend $backend1 -HealthProbeSettingsName "healthProbeSetting1" -LoadBalancingSettingsName "loadBalancingSetting1"
32+
New-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName -RoutingRule $routingrule1 -BackendPool $backendpool1 -FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -HealthProbeSetting $healthProbeSetting1 -Tag $tags
33+
34+
$retrievedFrontDoor = Get-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName
35+
Assert-NotNull $retrievedFrontDoor
36+
Assert-AreEqual $Name $retrievedFrontDoor.Name
37+
Assert-AreEqual $routingrule1.Name $retrievedFrontDoor.RoutingRules[0].Name
38+
Assert-AreEqual $loadBalancingSetting1.Name $retrievedFrontDoor.LoadBalancingSettings[0].Name
39+
Assert-AreEqual $healthProbeSetting1.Name $retrievedFrontDoor.HealthProbeSettings[0].Name
40+
Assert-AreEqual $backendpool1.Name $retrievedFrontDoor.BackendPools[0].Name
41+
Assert-AreEqual $frontendEndpoint1.Name $retrievedFrontDoor.FrontendEndpoints[0].Name
42+
Assert-Tags $tags $retrievedFrontDoor.Tags
43+
44+
$newTags = @{"tag1" = "value3"; "tag2" = "value4"}
45+
$updatedFrontDoor = Set-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName -Tag $newTags
46+
Assert-NotNull $updatedFrontDoor
47+
Assert-AreEqual $Name $updatedFrontDoor.Name
48+
Assert-AreEqual $routingrule1.Name $updatedFrontDoor.RoutingRules[0].Name
49+
Assert-AreEqual $loadBalancingSetting1.Name $updatedFrontDoor.LoadBalancingSettings[0].Name
50+
Assert-AreEqual $healthProbeSetting1.Name $updatedFrontDoor.HealthProbeSettings[0].Name
51+
Assert-AreEqual $backendpool1.Name $updatedFrontDoor.BackendPools[0].Name
52+
Assert-AreEqual $frontendEndpoint1.Name $updatedFrontDoor.FrontendEndpoints[0].Name
53+
Assert-Tags $newTags $updatedFrontDoor.Tags
54+
55+
$removed = Remove-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName -PassThru
56+
Assert-True { $removed }
57+
Assert-ThrowsContains { Get-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName } "does not exist"
58+
59+
Remove-AzureRmResourceGroup -Name $ResourceGroupName -Force
60+
}
61+
62+
<#
63+
.SYNOPSIS
64+
Front Door cycle with piping
65+
#>
66+
function Test-FrontDoorCrudWithPiping
67+
{
68+
$Name = getAssetName
69+
$resourceGroup = TestSetup-CreateResourceGroup
70+
$resourceGroupName = $resourceGroup.ResourceGroupName
71+
$tags = @{"tag1" = "value1"; "tag2" = "value2"}
72+
$hostName = "$Name.azurefd.net"
73+
$routingrule1 = New-AzureRmFrontDoorRoutingRuleObject -Name "routingrule1" -FrontDoorName $Name -ResourceGroupName $resourceGroupName -FrontendEndpointName "frontendEndpoint1" -BackendPoolName "backendPool1"
74+
$backend1 = New-AzureRmFrontDoorBackendObject -Address "contoso1.azurewebsites.net"
75+
$healthProbeSetting1 = New-AzureRmFrontDoorHealthProbeSettingObject -Name "healthProbeSetting1"
76+
$loadBalancingSetting1 = New-AzureRmFrontDoorLoadBalancingSettingObject -Name "loadbalancingsetting1"
77+
$frontendEndpoint1 = New-AzureRmFrontDoorFrontendEndpointObject -Name "frontendendpoint1" -HostName $hostName
78+
$backendpool1 = New-AzureRmFrontDoorBackendPoolObject -Name "backendpool1" -FrontDoorName $Name -ResourceGroupName $resourceGroupName -Backend $backend1 -HealthProbeSettingsName "healthProbeSetting1" -LoadBalancingSettingsName "loadBalancingSetting1"
79+
New-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName -RoutingRule $routingrule1 -BackendPool $backendpool1 -FrontendEndpoint $frontendEndpoint1 -LoadBalancingSetting $loadBalancingSetting1 -HealthProbeSetting $healthProbeSetting1 -Tag $tags
80+
81+
$newTags = @{"tag1" = "value3"; "tag2" = "value4"}
82+
$updatedFrontDoor = Get-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName | Set-AzureRmFrontDoor -Tag $newTags
83+
Assert-NotNull $updatedFrontDoor
84+
Assert-AreEqual $Name $updatedFrontDoor.Name
85+
Assert-AreEqual $routingrule1.Name $updatedFrontDoor.RoutingRules[0].Name
86+
Assert-AreEqual $loadBalancingSetting1.Name $updatedFrontDoor.LoadBalancingSettings[0].Name
87+
Assert-AreEqual $healthProbeSetting1.Name $updatedFrontDoor.HealthProbeSettings[0].Name
88+
Assert-AreEqual $backendpool1.Name $updatedFrontDoor.BackendPools[0].Name
89+
Assert-AreEqual $frontendEndpoint1.Name $updatedFrontDoor.FrontendEndpoints[0].Name
90+
Assert-Tags $newTags $updatedFrontDoor.Tags
91+
92+
$removed = Get-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName | Remove-AzureRmFrontDoor -PassThru
93+
Assert-True { $removed }
94+
Assert-ThrowsContains { Get-AzureRmFrontDoor -Name $Name -ResourceGroupName $resourceGroupName } "does not exist"
95+
}

0 commit comments

Comments
 (0)