diff --git a/src/Testcontainers/Configurations/TestcontainersSettings.cs b/src/Testcontainers/Configurations/TestcontainersSettings.cs index 40735c2dc..59dbc57d1 100644 --- a/src/Testcontainers/Configurations/TestcontainersSettings.cs +++ b/src/Testcontainers/Configurations/TestcontainersSettings.cs @@ -10,7 +10,6 @@ namespace DotNet.Testcontainers.Configurations using DotNet.Testcontainers.Containers; using DotNet.Testcontainers.Images; using JetBrains.Annotations; - using Microsoft.Extensions.Logging; /// /// This class represents the Testcontainers settings. @@ -18,8 +17,6 @@ namespace DotNet.Testcontainers.Configurations [PublicAPI] public static class TestcontainersSettings { - private static readonly ManualResetEventSlim ManualResetEvent = new ManualResetEventSlim(true); - [CanBeNull] private static readonly IDockerEndpointAuthenticationProvider DockerEndpointAuthProvider = new IDockerEndpointAuthenticationProvider[] @@ -103,14 +100,6 @@ static TestcontainersSettings() public static string HubImageNamePrefix { get; set; } = EnvironmentConfiguration.Instance.GetHubImageNamePrefix() ?? PropertiesFileConfiguration.Instance.GetHubImageNamePrefix(); - /// - /// Gets or sets the logger. - /// - [NotNull] - [Obsolete("Use the builder API WithLogger(ILogger) instead.")] - public static ILogger Logger { get; set; } - = ConsoleLogger.Instance; - /// /// Gets or sets the host operating system. /// @@ -118,14 +107,6 @@ static TestcontainersSettings() public static IOperatingSystem OS { get; set; } = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? (IOperatingSystem)new Windows(DockerEndpointAuthConfig) : new Unix(DockerEndpointAuthConfig); - /// - /// Gets the wait handle that signals settings initialized. - /// - [NotNull] - [Obsolete("This property is no longer supported.")] - public static WaitHandle SettingsInitialized - => ManualResetEvent.WaitHandle; - /// public static Task ExposeHostPortsAsync(ushort port, CancellationToken ct = default) => ExposeHostPortsAsync(new[] { port }, ct); diff --git a/src/Testcontainers/Containers/DockerContainer.cs b/src/Testcontainers/Containers/DockerContainer.cs index 9d846d40f..1343fce58 100644 --- a/src/Testcontainers/Containers/DockerContainer.cs +++ b/src/Testcontainers/Containers/DockerContainer.cs @@ -38,18 +38,6 @@ public DockerContainer(IContainerConfiguration configuration) _configuration = configuration; } - /// - /// Initializes a new instance of the class. - /// - /// The container configuration. - /// The logger. - [Obsolete("Use the constructor DockerContainer(IContainerConfiguration) instead.")] - public DockerContainer(IContainerConfiguration configuration, ILogger logger) - { - _client = new TestcontainersClient(configuration.SessionId, configuration.DockerEndpointAuthConfig, logger); - _configuration = configuration; - } - /// public event EventHandler Creating; diff --git a/src/Testcontainers/Containers/ResourceReaper.cs b/src/Testcontainers/Containers/ResourceReaper.cs index 26bf3e472..c29792eaa 100644 --- a/src/Testcontainers/Containers/ResourceReaper.cs +++ b/src/Testcontainers/Containers/ResourceReaper.cs @@ -96,20 +96,6 @@ private ResourceReaper(Guid sessionId, IDockerEndpointAuthenticationConfiguratio [PublicAPI] public Guid SessionId { get; } - /// - /// Starts and returns the default instance. - /// - /// The Docker endpoint authentication configuration. - /// Determines whether the Windows engine is enabled or not. - /// The cancellation token to cancel the initialization. - /// Task that completes when the has been started. - [PublicAPI] - [Obsolete("Use GetAndStartDefaultAsync(IDockerEndpointAuthenticationConfiguration, ILogger, bool, CancellationToken) instead.")] - public static Task GetAndStartDefaultAsync(IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, bool isWindowsEngineEnabled = false, CancellationToken ct = default) - { - return GetAndStartDefaultAsync(dockerEndpointAuthConfig, ConsoleLogger.Instance, isWindowsEngineEnabled, ct); - } - /// /// Starts and returns the default instance. /// diff --git a/tests/Testcontainers.ResourceReaper.Tests/DefaultResourceReaperTest.cs b/tests/Testcontainers.ResourceReaper.Tests/DefaultResourceReaperTest.cs index aaaad3de0..dc7430a8d 100644 --- a/tests/Testcontainers.ResourceReaper.Tests/DefaultResourceReaperTest.cs +++ b/tests/Testcontainers.ResourceReaper.Tests/DefaultResourceReaperTest.cs @@ -11,7 +11,7 @@ public sealed class DefaultResourceReaperTest : IAsyncLifetime { public async Task InitializeAsync() { - var resourceReaper = await ResourceReaper.GetAndStartDefaultAsync(TestcontainersSettings.OS.DockerEndpointAuthConfig) + var resourceReaper = await ResourceReaper.GetAndStartDefaultAsync(TestcontainersSettings.OS.DockerEndpointAuthConfig, ConsoleLogger.Instance) .ConfigureAwait(false); await resourceReaper.DisposeAsync()