Skip to content

Commit

Permalink
[Traffic Manager] Adding new IPv4 and IPv6 specific parameters for mi…
Browse files Browse the repository at this point in the history
…nchild 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 <raghosal@microsoft.com>
  • Loading branch information
rajitaaa and Rajita Ghosal authored Jan 24, 2022
1 parent a417aff commit 559e606
Show file tree
Hide file tree
Showing 58 changed files with 23,244 additions and 17,161 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,13 @@ public void TestAddAndRemoveCustomHeadersFromEndpoint()
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddAndRemoveCustomHeadersFromEndpoint");
}

[Fact]
// This scenario is not supported with current API specs. Commenting this test.

/* [Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestAddAndRemoveIpAddressRanges()
{
TestController.NewInstance.RunPowerShellTest(_logger, "Test-AddAndRemoveIpAddressRanges");
}
}*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,43 @@ function Test-NestedEndpointsCreateUpdate
$anotherCreatedChildProfile = New-AzTrafficManagerProfile -Name $anotherChildProfileName -ResourceGroupName $resourceGroup.ResourceGroupName -RelativeDnsName $anotherChildProfileRelativeName -Ttl 50 -TrafficRoutingMethod "Performance" -MonitorProtocol "HTTP" -MonitorPort 80 -MonitorPath "/testpath.asp" -ProfileStatus "Enabled"
Assert-NotNull $anotherCreatedChildProfile.Id

$anotherNestedEndpoint = New-AzTrafficManagerEndpoint -Name "MySecondNestedEndpoint" -ProfileName $parentProfileName -ResourceGroupName $resourceGroup.ResourceGroupName -Type "NestedEndpoints" -TargetResourceId $anotherCreatedChildProfile.Id -EndpointStatus "Enabled" -EndpointLocation "West Europe" -MinChildEndpoints 3
$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

Assert-NotNull $anotherNestedEndpoint
Assert-AreEqual 3 $anotherNestedEndpoint.MinChildEndpoints
Assert-AreEqual 2 $anotherNestedEndpoint.MinChildEndpointsIPv4
Assert-AreEqual 1 $anotherNestedEndpoint.MinChildEndpointsIPv6
Assert-AreEqual "West Europe" $anotherNestedEndpoint.Location

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

Assert-NotNull $retrievedParentProfile
Assert-AreEqual 2 $retrievedParentProfile.Endpoints.Count
Assert-AreEqual 3 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
Assert-AreEqual 2 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv4
Assert-AreEqual 1 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv6
Assert-AreEqual "West Europe" $retrievedParentProfile.Endpoints[1].Location

$anotherNestedEndpoint.MinChildEndpoints = 4
$anotherNestedEndpoint.MinChildEndpoints = 6
$anotherNestedEndpoint.MinChildEndpointsIPv4 = 2
$anotherNestedEndpoint.MinChildEndpointsIPv6 = 3
$anotherNestedEndpoint.Location = "West US"

$anotherNestedEndpoint = Set-AzTrafficManagerEndpoint -TrafficManagerEndpoint $anotherNestedEndpoint

Assert-NotNull $anotherNestedEndpoint
Assert-AreEqual 4 $anotherNestedEndpoint.MinChildEndpoints
Assert-AreEqual 6 $anotherNestedEndpoint.MinChildEndpoints
Assert-AreEqual 2 $anotherNestedEndpoint.MinChildEndpointsIPv4
Assert-AreEqual 3 $anotherNestedEndpoint.MinChildEndpointsIPv6
Assert-AreEqual "West US" $anotherNestedEndpoint.Location

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

Assert-NotNull $retrievedParentProfile
Assert-AreEqual 2 $retrievedParentProfile.Endpoints.Count
Assert-AreEqual 4 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
Assert-AreEqual 6 $retrievedParentProfile.Endpoints[1].MinChildEndpoints
Assert-AreEqual 2 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv4
Assert-AreEqual 3 $retrievedParentProfile.Endpoints[1].MinChildEndpointsIPv6
Assert-AreEqual "West US" $retrievedParentProfile.Endpoints[1].Location
}
finally
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 559e606

Please sign in to comment.