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

Commit

Permalink
Disable NegotiateStreamTest fixture for distros without working Kerbe…
Browse files Browse the repository at this point in the history
…ros (#24098)

Disable NegotiateStreamTest fixture entirely because setup-kdc.sh is broken on some distros
  • Loading branch information
danmoseley authored and karelz committed Sep 18, 2017
1 parent 382c683 commit 99bffa9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
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

0 comments on commit 99bffa9

Please sign in to comment.