Skip to content

Commit 559e606

Browse files
rajitaaaRajita Ghosal
andauthored
[Traffic Manager] Adding new IPv4 and IPv6 specific parameters for minchild endpoints (#16875)
* updating traffic manager SDK version * adding minChildEndpoint parameters for ipv4 and ipv6 * modifying test and updating docs * updating changeLog * recording tests * removing an unsupported scenario test * minor bug fix * updating test and re-recording Co-authored-by: Rajita Ghosal <[email protected]>
1 parent a417aff commit 559e606

File tree

58 files changed

+23244
-17161
lines changed

Some content is hidden

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

58 files changed

+23244
-17161
lines changed

src/TrafficManager/TrafficManager.Test/ScenarioTests/EndpointTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,13 @@ public void TestAddAndRemoveCustomHeadersFromEndpoint()
175175
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddAndRemoveCustomHeadersFromEndpoint");
176176
}
177177

178-
[Fact]
178+
// This scenario is not supported with current API specs. Commenting this test.
179+
180+
/* [Fact]
179181
[Trait(Category.AcceptanceType, Category.CheckIn)]
180182
public void TestAddAndRemoveIpAddressRanges()
181183
{
182184
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddAndRemoveIpAddressRanges");
183-
}
185+
}*/
184186
}
185187
}

src/TrafficManager/TrafficManager.Test/ScenarioTests/NestedEndpointsTests.ps1

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,43 @@ function Test-NestedEndpointsCreateUpdate
5050
$anotherCreatedChildProfile = New-AzTrafficManagerProfile -Name $anotherChildProfileName -ResourceGroupName $resourceGroup.ResourceGroupName -RelativeDnsName $anotherChildProfileRelativeName -Ttl 50 -TrafficRoutingMethod "Performance" -MonitorProtocol "HTTP" -MonitorPort 80 -MonitorPath "/testpath.asp" -ProfileStatus "Enabled"
5151
Assert-NotNull $anotherCreatedChildProfile.Id
5252

53-
$anotherNestedEndpoint = New-AzTrafficManagerEndpoint -Name "MySecondNestedEndpoint" -ProfileName $parentProfileName -ResourceGroupName $resourceGroup.ResourceGroupName -Type "NestedEndpoints" -TargetResourceId $anotherCreatedChildProfile.Id -EndpointStatus "Enabled" -EndpointLocation "West Europe" -MinChildEndpoints 3
53+
$anotherNestedEndpoint = New-AzTrafficManagerEndpoint -Name "MySecondNestedEndpoint" -ProfileName $parentProfileName -ResourceGroupName $resourceGroup.ResourceGroupName -Type "NestedEndpoints" -TargetResourceId $anotherCreatedChildProfile.Id -EndpointStatus "Enabled" -EndpointLocation "West Europe" -MinChildEndpoints 3 -MinChildEndpointsIPv4 2 -MinChildEndpointsIPv6 1
5454

5555
Assert-NotNull $anotherNestedEndpoint
5656
Assert-AreEqual 3 $anotherNestedEndpoint.MinChildEndpoints
57+
Assert-AreEqual 2 $anotherNestedEndpoint.MinChildEndpointsIPv4
58+
Assert-AreEqual 1 $anotherNestedEndpoint.MinChildEndpointsIPv6
5759
Assert-AreEqual "West Europe" $anotherNestedEndpoint.Location
5860

5961
$retrievedParentProfile = Get-AzTrafficManagerProfile -Name $parentProfileName -ResourceGroupName $resourceGroup.ResourceGroupName
6062

6163
Assert-NotNull $retrievedParentProfile
6264
Assert-AreEqual 2 $retrievedParentProfile.Endpoints.Count
6365
Assert-AreEqual 3 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
66+
Assert-AreEqual 2 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv4
67+
Assert-AreEqual 1 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv6
6468
Assert-AreEqual "West Europe" $retrievedParentProfile.Endpoints[1].Location
6569

66-
$anotherNestedEndpoint.MinChildEndpoints = 4
70+
$anotherNestedEndpoint.MinChildEndpoints = 6
71+
$anotherNestedEndpoint.MinChildEndpointsIPv4 = 2
72+
$anotherNestedEndpoint.MinChildEndpointsIPv6 = 3
6773
$anotherNestedEndpoint.Location = "West US"
6874

6975
$anotherNestedEndpoint = Set-AzTrafficManagerEndpoint -TrafficManagerEndpoint $anotherNestedEndpoint
7076

7177
Assert-NotNull $anotherNestedEndpoint
72-
Assert-AreEqual 4 $anotherNestedEndpoint.MinChildEndpoints
78+
Assert-AreEqual 6 $anotherNestedEndpoint.MinChildEndpoints
79+
Assert-AreEqual 2 $anotherNestedEndpoint.MinChildEndpointsIPv4
80+
Assert-AreEqual 3 $anotherNestedEndpoint.MinChildEndpointsIPv6
7381
Assert-AreEqual "West US" $anotherNestedEndpoint.Location
7482

7583
$retrievedParentProfile = Get-AzTrafficManagerProfile -Name $parentProfileName -ResourceGroupName $resourceGroup.ResourceGroupName
7684

7785
Assert-NotNull $retrievedParentProfile
7886
Assert-AreEqual 2 $retrievedParentProfile.Endpoints.Count
79-
Assert-AreEqual 4 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
87+
Assert-AreEqual 6 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
88+
Assert-AreEqual 2 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv4
89+
Assert-AreEqual 3 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv6
8090
Assert-AreEqual "West US" $retrievedParentProfile.Endpoints[1].Location
8191
}
8292
finally

src/TrafficManager/TrafficManager.Test/SessionRecords/Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.EndpointTests/TestAddAndRemoveCustomHeadersFromEndpoint.json

Lines changed: 439 additions & 610 deletions
Large diffs are not rendered by default.

src/TrafficManager/TrafficManager.Test/SessionRecords/Microsoft.Azure.Commands.TrafficManager.Test.ScenarioTests.EndpointTests/TestAddAndRemoveIpAddressRanges.json

Lines changed: 639 additions & 549 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)