Skip to content

Commit

Permalink
Disable NTML tests on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Apr 3, 2024
1 parent f7f689e commit 1b11eb2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/RestSharp.Tests.Integrated/NtlmTests.cs
Expand Up @@ -4,10 +4,14 @@

namespace RestSharp.Tests.Integrated;

/// <summary>
/// These tests use NTML auth and don't work on Linux, at least not in GH Actions
/// </summary>
public class NtlmTests : CaptureFixture {
[Fact]
public async Task Does_Not_Pass_Default_Credentials_When_Server_Does_Not_Negotiate() {
if (!OperatingSystem.IsWindows()) return;
if (OperatingSystem.IsLinux()) return;

using var server = SimpleServer.Create(Handlers.Generic<RequestHeadCapturer>());

var client = new RestClient(new RestClientOptions(server.Url) { UseDefaultCredentials = true });
Expand All @@ -25,6 +29,8 @@ public class NtlmTests : CaptureFixture {

[Fact]
public async Task Does_Not_Pass_Default_Credentials_When_UseDefaultCredentials_Is_False() {
if (OperatingSystem.IsLinux()) return;

using var server = SimpleServer.Create(Handlers.Generic<RequestHeadCapturer>(), AuthenticationSchemes.Negotiate);

var client = new RestClient(new RestClientOptions(server.Url) { UseDefaultCredentials = false });
Expand All @@ -37,7 +43,7 @@ public class NtlmTests : CaptureFixture {

[Fact]
public async Task Passes_Default_Credentials_When_UseDefaultCredentials_Is_True() {
if (!OperatingSystem.IsWindows()) return;
if (OperatingSystem.IsLinux()) return;

using var server = SimpleServer.Create(Handlers.Generic<RequestHeadCapturer>(), AuthenticationSchemes.Negotiate);

Expand Down

0 comments on commit 1b11eb2

Please sign in to comment.