Skip to content

Commit

Permalink
disable tests on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Erwinvandervalk committed Jan 13, 2025
1 parent d984b6f commit 759ad43
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bff-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [macOS-latest, ubuntu-latest, windows-latest]
runs-on: [ubuntu-latest, windows-latest]
name: ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
defaults:
Expand Down
11 changes: 10 additions & 1 deletion bff/build/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
 using System;
using System.IO;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;

Expand Down Expand Up @@ -45,7 +46,15 @@ internal static async Task Main(string[] args)

Target(Targets.Test, DependsOn(Targets.Build), () =>
{
Run("dotnet", "test -c Release --no-build --nologo");
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Run("dotnet", "dev-certs https --trust");
Run("dotnet", "test -c Release --no-build --nologo");
}
else
{
Console.WriteLine("Skipping tests on windows and linux");
}
});

Target(Targets.CleanPackOutput, () =>
Expand Down
18 changes: 8 additions & 10 deletions bff/samples/Hosts.Tests/BffTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ public async Task Can_initiate_login()

[SkippableTheory]
[InlineData("/local/self-contained")]

// These url's require service discovery to work for the BFF in combination with YARP
//[InlineData("/invokes-external-api")]
//[InlineData("/api/user-token")]
//[InlineData("/api/client-token")]
//[InlineData("/api/user-or-client-token")]
//[InlineData("/api/anonymous")]
//[InlineData("/api/optional-user-token")]
//[InlineData("/api/impersonation")]
//[InlineData("/api/audience-constrained")]
[InlineData("/local/invokes-external-api")]
[InlineData("/api/user-token")]
[InlineData("/api/client-token")]
[InlineData("/api/user-or-client-token")]
[InlineData("/api/anonymous")]
[InlineData("/api/optional-user-token")]
[InlineData("/api/impersonation")]
[InlineData("/api/audience-constrained")]
public async Task Once_authenticated_can_call_proxied_urls(string url)
{
await _bffClient.TriggerLogin();
Expand Down
1 change: 1 addition & 0 deletions bff/samples/Hosts.Tests/TestInfra/AppHostFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public async Task InitializeAsync()
// So, create an apphost that will be used for the duration of this testrun.
var appHost = await DistributedApplicationTestingBuilder
.CreateAsync<Projects.Hosts_AppHost>();
appHost.Configuration["DcpPublisher:RandomizePorts"] = "false";

appHost.Services.ConfigureHttpClientDefaults(c => c.ConfigurePrimaryHttpMessageHandler(() =>
{
Expand Down

0 comments on commit 759ad43

Please sign in to comment.