Skip to content

Commit

Permalink
Disable failing DNS tests on SLES (#48759)
Browse files Browse the repository at this point in the history
* Disable failing DNS tests on Linux

As there's currently no infrastructure to disable just for SLES,
disabling for its parent, which is Linux.

* Disable failing dns tests for sles only
  • Loading branch information
ViktorHofer committed Feb 25, 2021
1 parent 8065f95 commit cbc05c4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static partial class PlatformDetection
public static bool IsUbuntu1710OrHigher => IsDistroAndVersionOrHigher("ubuntu", 17, 10);
public static bool IsUbuntu1804 => IsDistroAndVersion("ubuntu", 18, 04);
public static bool IsUbuntu1810OrHigher => IsDistroAndVersionOrHigher("ubuntu", 18, 10);
public static bool IsSLES => IsDistroAndVersion("sles");
public static bool IsTizen => IsDistroAndVersion("tizen");
public static bool IsFedora => IsDistroAndVersion("fedora");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ public void DnsObsoleteGetHostByName_IPv6String_ReturnsOnlyGivenIP()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/48751")]
return;
}

IPHostEntry entry = Dns.GetHostByName("");

// DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.
Expand All @@ -115,6 +121,12 @@ public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process), nameof(PlatformDetection.IsThreadingSupported))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/48751")]
return;
}

IPHostEntry entry = Dns.EndGetHostByName(Dns.BeginGetHostByName("", null, null));

// DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,18 @@ public async Task Dns_GetHostEntryAsync_IPAddress_Ok()
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[InlineData("")]
[InlineData(TestSettings.LocalHost)]
public async Task Dns_GetHostEntry_HostString_Ok(string hostName)
{
if (PlatformDetection.IsSLES)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/48751")]
return;
}

try
{
await TestGetHostEntryAsync(() => Task.FromResult(Dns.GetHostEntry(hostName)));
Expand Down Expand Up @@ -70,11 +77,20 @@ public async Task Dns_GetHostEntry_HostString_Ok(string hostName)
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/48751", TestPlatforms.Linux)]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[InlineData("")]
[InlineData(TestSettings.LocalHost)]
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName) =>
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName)
{
if (PlatformDetection.IsSLES)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/48751")]
return;
}

await TestGetHostEntryAsync(() => Dns.GetHostEntryAsync(hostName));
}

[Fact]
public async Task Dns_GetHostEntryAsync_IPString_Ok() =>
Expand Down

0 comments on commit cbc05c4

Please sign in to comment.