From db4e4538bcdec9ee844bd0440e79e3e175d63d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Nag=C3=B3rski?= Date: Thu, 16 Nov 2023 06:41:09 +0100 Subject: [PATCH] Enable trace logging for Integration tests --- .../TestsFixtures/InfrastructureFixture.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/Renci.SshNet.IntegrationTests/TestsFixtures/InfrastructureFixture.cs b/test/Renci.SshNet.IntegrationTests/TestsFixtures/InfrastructureFixture.cs index 97e8c3776..f01df813d 100644 --- a/test/Renci.SshNet.IntegrationTests/TestsFixtures/InfrastructureFixture.cs +++ b/test/Renci.SshNet.IntegrationTests/TestsFixtures/InfrastructureFixture.cs @@ -1,7 +1,11 @@ -using DotNet.Testcontainers.Builders; +using System.Diagnostics; + +using DotNet.Testcontainers.Builders; using DotNet.Testcontainers.Containers; using DotNet.Testcontainers.Images; +using Renci.SshNet.Abstractions; + namespace Renci.SshNet.IntegrationTests.TestsFixtures { public sealed class InfrastructureFixture : IDisposable @@ -34,6 +38,10 @@ public static InfrastructureFixture Instance public async Task InitializeAsync() { + DiagnosticAbstraction.Source.Switch = new SourceSwitch("sourceSwitch", "Verbose"); + DiagnosticAbstraction.Source.Listeners.Remove("Default"); + DiagnosticAbstraction.Source.Listeners.Add(new ConsoleTraceListener()); + _sshServerImage = new ImageFromDockerfileBuilder() .WithName("renci-ssh-tests-server-image") .WithDockerfileDirectory(CommonDirectoryPath.GetSolutionDirectory(), Path.Combine("test", "Renci.SshNet.IntegrationTests"))