diff --git a/docs/api/create_docker_container.md b/docs/api/create_docker_container.md index a3b2ba174..afde72e27 100644 --- a/docs/api/create_docker_container.md +++ b/docs/api/create_docker_container.md @@ -118,7 +118,6 @@ Assert.Equal(MagicNumber, magicNumber); | `WithNetwork` | Assigns a network to the container e.g. `--network "bridge"`. | | `WithNetworkAliases` | Assigns a network-scoped aliases to the container e.g. `--network-alias "alias"`. | | `WithPrivileged` | Sets the `--privileged` flag. | -| `WithOutputConsumer` | Redirects `stdout` and `stderr` to capture the container output. | | `WithWaitStrategy` | Sets the wait strategy to complete the container start and indicates when it is ready. | | `WithStartupCallback` | Sets the startup callback to invoke after the container start. | | `WithCreateParameterModifier` | Allows low level modifications of the Docker container create parameter. | diff --git a/src/Testcontainers/BackwardCompatibility/BackwardsCompatibility.cs b/src/Testcontainers/BackwardCompatibility/BackwardsCompatibility.cs index aa1e6d4cb..8e8fd8b37 100644 --- a/src/Testcontainers/BackwardCompatibility/BackwardsCompatibility.cs +++ b/src/Testcontainers/BackwardCompatibility/BackwardsCompatibility.cs @@ -55,12 +55,12 @@ public interface IDockerContainer : IAsyncDisposable ushort GetMappedPublicPort(string containerPort); - [Obsolete("Use GetExitCodeAsync(CancellationToken) instead.")] + [Obsolete("Use IContainer.GetExitCodeAsync(CancellationToken) instead.")] Task GetExitCode(CancellationToken ct = default); Task GetExitCodeAsync(CancellationToken ct = default); - [Obsolete("Use GetLogsAsync(DateTime, DateTime, bool, CancellationToken) instead.")] + [Obsolete("Use IContainer.GetLogsAsync(DateTime, DateTime, bool, CancellationToken) instead.")] Task<(string Stdout, string Stderr)> GetLogs(DateTime since = default, DateTime until = default, bool timestampsEnabled = true, CancellationToken ct = default); Task<(string Stdout, string Stderr)> GetLogsAsync(DateTime since = default, DateTime until = default, bool timestampsEnabled = true, CancellationToken ct = default); diff --git a/src/Testcontainers/Builders/IContainerBuilder`2.cs b/src/Testcontainers/Builders/IContainerBuilder`2.cs index 209d7e67b..0e12ad30b 100644 --- a/src/Testcontainers/Builders/IContainerBuilder`2.cs +++ b/src/Testcontainers/Builders/IContainerBuilder`2.cs @@ -336,7 +336,7 @@ public interface IContainerBuilder : I /// The output consumer. /// A configured instance of . [PublicAPI] - [Obsolete("It is no longer necessary to assign an output consumer to read the container's log messages.\nUse IContainer.GetLogs(DateTime, DateTime, bool, CancellationToken) instead.")] + [Obsolete("It is no longer necessary to assign an output consumer to read the container's log messages.\nUse IContainer.GetLogsAsync(DateTime, DateTime, bool, CancellationToken) instead.")] TBuilderEntity WithOutputConsumer(IOutputConsumer outputConsumer); /// diff --git a/src/Testcontainers/Configurations/WaitStrategies/UntilMessageIsLogged.cs b/src/Testcontainers/Configurations/WaitStrategies/UntilMessageIsLogged.cs index e507745f4..1e97ab4ba 100644 --- a/src/Testcontainers/Configurations/WaitStrategies/UntilMessageIsLogged.cs +++ b/src/Testcontainers/Configurations/WaitStrategies/UntilMessageIsLogged.cs @@ -21,7 +21,7 @@ public UntilMessageIsLogged(Regex pattern) public async Task UntilAsync(IContainer container) { - var (stdout, stderr) = await container.GetLogs(timestampsEnabled: false) + var (stdout, stderr) = await container.GetLogsAsync(timestampsEnabled: false) .ConfigureAwait(false); return this.pattern.IsMatch(stdout) || this.pattern.IsMatch(stderr);