Skip to content

Commit 314c759

Browse files
committed
Skip GetHost* tests only on SLES
1 parent cac2293 commit 314c759

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostByNameTest.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ public void DnsObsoleteGetHostByName_IPv6String_ReturnsOnlyGivenIP()
104104
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
105105
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
106106
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
107-
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
108107
public void DnsObsoleteGetHostByName_EmptyString_ReturnsHostName()
109108
{
109+
if (PlatformDetection.IsSLES)
110+
{
111+
// See https://github.com/dotnet/runtime/issues/55271
112+
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
113+
}
110114
IPHostEntry entry = Dns.GetHostByName("");
111115

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

116120
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process), nameof(PlatformDetection.IsThreadingSupported))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
117121
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
118-
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
119122
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
120123
public void DnsObsoleteBeginEndGetHostByName_EmptyString_ReturnsHostName()
121124
{
125+
if (PlatformDetection.IsSLES)
126+
{
127+
// See https://github.com/dotnet/runtime/issues/55271
128+
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
129+
}
130+
122131
IPHostEntry entry = Dns.EndGetHostByName(Dns.BeginGetHostByName("", null, null));
123132

124133
// DNS labels should be compared as case insensitive for ASCII characters. See RFC 4343.

src/libraries/System.Net.NameResolution/tests/FunctionalTests/GetHostEntryTest.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ public async Task Dns_GetHostEntryAsync_IPAddress_Ok()
2121
}
2222

2323
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
24-
24+
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
2525
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
2626
[InlineData("")]
2727
[InlineData(TestSettings.LocalHost)]
28-
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
29-
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
3028
public async Task Dns_GetHostEntry_HostString_Ok(string hostName)
3129
{
30+
if (PlatformDetection.IsSLES)
31+
{
32+
// See https://github.com/dotnet/runtime/issues/55271
33+
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
34+
}
35+
3236
try
3337
{
3438
await TestGetHostEntryAsync(() => Task.FromResult(Dns.GetHostEntry(hostName)));
@@ -73,13 +77,20 @@ public async Task Dns_GetHostEntry_HostString_Ok(string hostName)
7377
}
7478

7579
[ActiveIssue("https://github.com/dotnet/runtime/issues/1488", TestPlatforms.OSX)]
80+
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
7681
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // [ActiveIssue("https://github.com/dotnet/runtime/issues/27622")]
7782
[InlineData("")]
7883
[InlineData(TestSettings.LocalHost)]
79-
[ActiveIssue("https://github.com/dotnet/runtime/issues/51377", TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.MacCatalyst)]
80-
[ActiveIssue("https://github.com/dotnet/runtime/issues/55271", TestPlatforms.Linux)]
81-
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName) =>
84+
public async Task Dns_GetHostEntryAsync_HostString_Ok(string hostName)
85+
{
86+
if (PlatformDetection.IsSLES)
87+
{
88+
// See https://github.com/dotnet/runtime/issues/55271
89+
throw new SkipTestException("SLES Tests environment is not configured for this test to work.");
90+
}
91+
8292
await TestGetHostEntryAsync(() => Dns.GetHostEntryAsync(hostName));
93+
}
8394

8495
[Fact]
8596
public async Task Dns_GetHostEntryAsync_IPString_Ok() =>

0 commit comments

Comments
 (0)