Skip to content

Commit

Permalink
Skip GetHost* tests only on SLES
Browse files Browse the repository at this point in the history
  • Loading branch information
hoyosjs committed Jul 10, 2021
1 parent cac2293 commit 314c759
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ public void DnsObsoleteGetHostByName_IPv6String_ReturnsOnlyGivenIP()
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
}
IPHostEntry entry = Dns.GetHostByName("");

// DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.
Expand All @@ -115,10 +119,15 @@ public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process), nameof(PlatformDetection.IsThreadingSupported))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName()
{
if (PlatformDetection.IsSLES)
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
}

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,14 +21,18 @@ public async Task Dns_GetHostEntryAsync_IPAddress_Ok()
}

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

[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[InlineData("")]
[InlineData(TestSettings.LocalHost)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
public async Task Dns_GetHostEntry_HostString_Ok(string hostName)
{
if (PlatformDetection.IsSLES)
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
}

try
{
await TestGetHostEntryAsync(() => Task.FromResult(Dns.GetHostEntry(hostName)));
Expand Down Expand Up @@ -73,13 +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/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
[InlineData("")]
[InlineData(TestSettings.LocalHost)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName) =>
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName)
{
if (PlatformDetection.IsSLES)
{
// See https://github.com/dotnet/runtime/issues/55271
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
}

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

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

0 comments on commit 314c759

Please sign in to comment.