Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Disable NegotiateStreamTest fixture for distros without working Kerberos #24098

Merged
merged 4 commits into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public static partial class PlatformDetection
public static Version ICUVersion { get { return null; } }
public static bool IsUbuntu { get { throw null; } }
public static bool IsUbuntu1404 { get { throw null; } }
public static bool IsUbuntu1604 { get { throw null; } }
public static bool IsUbuntu1704 { get { throw null; } }
public static bool IsUbuntu1710 { get { throw null; } }
public static bool IsWindows { get { throw null; } }
public static bool IsWindows10InsiderPreviewBuild16215OrGreater { get { throw null; } }
public static bool IsWindows10Version1607OrGreater { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public static partial class PlatformDetection
public static bool IsDebian => IsDistroAndVersion("debian");
public static bool IsDebian8 => IsDistroAndVersion("debian", "8");
public static bool IsUbuntu1404 => IsDistroAndVersion("ubuntu", "14.04");
public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", "16.04");
public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", "17.04");
public static bool IsUbuntu1710 => IsDistroAndVersion("ubuntu", "17.10");
public static bool IsCentos7 => IsDistroAndVersion("centos", "7");
public static bool IsTizen => IsDistroAndVersion("tizen");
public static bool IsNotFedoraOrRedHatOrCentos => !IsDistroAndVersion("fedora") && !IsDistroAndVersion("rhel") && !IsDistroAndVersion("centos");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public static partial class PlatformDetection
public static bool IsDebian => false;
public static bool IsDebian8 => false;
public static bool IsUbuntu1404 => false;
public static bool IsUbuntu1604 => false;
public static bool IsUbuntu1704 => false;
public static bool IsUbuntu1710 => false;
public static bool IsCentos7 => false;
public static bool IsTizen => false;
public static bool IsNotFedoraOrRedHatOrCentos => true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -72,15 +73,31 @@ public bool CheckAndClearCredentials(ITestOutputHelper output)
}

// Clear the credentials
var startInfo = new ProcessStartInfo(KDestroyCmd);
startInfo.UseShellExecute = true;
startInfo.CreateNoWindow = true;
startInfo.Arguments = "-A";
using (Process clearCreds = Process.Start(startInfo))
{
clearCreds.WaitForExit();
output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode);
return (clearCreds.ExitCode == 0);
try
{
var startInfo = new ProcessStartInfo(KDestroyCmd);
startInfo.UseShellExecute = true;
startInfo.CreateNoWindow = true;
startInfo.Arguments = "-A";
using (Process clearCreds = Process.Start(startInfo))
{
clearCreds.WaitForExit();
output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode);
return (clearCreds.ExitCode == 0);
}
}
catch (Win32Exception)
{
// https://github.com/dotnet/corefx/issues/24000
// on these distros right now
Assert.True(PlatformDetection.IsUbuntu1704 ||
PlatformDetection.IsUbuntu1710 ||
PlatformDetection.IsOpenSUSE ||
PlatformDetection.IsFedora ||
PlatformDetection.IsDebian ||
PlatformDetection.IsCentos7);

return false;
}
}

Expand Down