Skip to content
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
10 changes: 8 additions & 2 deletions tests/TUnit.Aspire.Tests.AppHost/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
using Aspire.Hosting.ApplicationModel;

var builder = DistributedApplication.CreateBuilder(args);

builder.AddParameter("my-secret", secret: true);
builder.AddContainer("nginx-no-healthcheck", "nginx");
// These resources only serve HTTP and export telemetry over HTTP. They do not need
// Aspire to prepare custom CA trust bundles before DCP can start them (#7616).
builder.AddContainer("nginx-no-healthcheck", "nginx")
.WithCertificateTrustScope(CertificateTrustScope.None);
builder.AddProject<Projects.TUnit_Aspire_Tests_ApiService>("api-service")
.WithHttpEndpoint(targetPort: 8080);
.WithHttpEndpoint(targetPort: 8080)
.WithCertificateTrustScope(CertificateTrustScope.None);

builder.Build().Run();
5 changes: 4 additions & 1 deletion tests/TUnit.Engine.Tests/InvokableTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,14 @@ private async Task<CommandTask<BufferedCommandResult>> RunWithFailureLogging(Com

$@"Mode: {testMode}",
@$"Command Input: {command}",
@$"Process ID: {commandTask.ProcessId}",
@$"Exit Code: {commandResult?.ExitCode.ToString(System.Globalization.CultureInfo.InvariantCulture) ?? "unavailable"}",
@$"Expected TRX: {trxPath}",
@$"Error: {commandResult?.StandardError}",
@$"Output: {commandResult?.StandardOutput}"

Expression: {assertionExpression}
""");
""", e);
}

return commandTask;
Expand Down
Loading