Skip to content

Commit 9414149

Browse files
Add relevant tests and update changelog.md
Minor change Add sessionrecords Minor change
1 parent 5fd2020 commit 9414149

File tree

5 files changed

+1169
-2
lines changed

5 files changed

+1169
-2
lines changed

src/PrivateDns/PrivateDns.Test/ScenarioTests/ZoneTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ public void TestZoneNewAlreadyExists()
9191
PrivateDnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneNewAlreadyExists");
9292
}
9393

94+
[Fact]
95+
[Trait(Category.AcceptanceType, Category.CheckIn)]
96+
public void TestZoneNewWithLocalSuffix()
97+
{
98+
PrivateDnsTestsBase.NewInstance.RunPowerShellTest(_logger, "Test-ZoneNewWithLocalSuffix");
99+
}
100+
94101
[Fact()]
95102
[Trait(Category.AcceptanceType, Category.CheckIn)]
96103
public void TestZoneSetEtagMismatch()

src/PrivateDns/PrivateDns.Test/ScenarioTests/ZoneTests.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,26 @@ function Test-ZoneNewAlreadyExists
187187
Remove-AzResourceGroup -Name $resourceGroupName -Force
188188
}
189189

190+
<#
191+
.SYNOPSIS
192+
Test zone creation with .local suffix.
193+
#>
194+
function Test-ZoneNewWithLocalSuffix
195+
{
196+
$zoneName = Get-RandomZoneName
197+
$zoneName = $zoneName + ".local"
198+
$resourceGroup = TestSetup-CreateResourceGroup
199+
$resourceGroupName = $resourceGroup.ResourceGroupName
200+
$createdZone = New-AzPrivateDnsZone -Name $zoneName -ResourceGroupName $resourceGroupName -WarningVariable warnings
201+
202+
Assert-NotNull $createdZone
203+
$message = "Please be aware that DNS names ending with .local are reserved for use with multicast DNS and may not work as expected with some operating systems. For details refer to your operating systems documentation."
204+
Assert-AreEqual $message $warnings
205+
206+
$createdZone | Remove-AzPrivateDnsZone -PassThru -Confirm:$false
207+
Remove-AzResourceGroup -Name $resourceGroupName -Force
208+
}
209+
190210
<#
191211
.SYNOPSIS
192212
Test zone update when etags mismatch

0 commit comments

Comments
 (0)