Skip to content

Commit

Permalink
chore: Remove WithOutputConsumer from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn committed Feb 19, 2023
1 parent d6bdf94 commit 0c72125
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion docs/api/create_docker_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public interface IDockerContainer : IAsyncDisposable

ushort GetMappedPublicPort(string containerPort);

[Obsolete("Use GetExitCodeAsync(CancellationToken) instead.")]
[Obsolete("Use IContainer.GetExitCodeAsync(CancellationToken) instead.")]
Task<long> GetExitCode(CancellationToken ct = default);

Task<long> 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);
Expand Down
2 changes: 1 addition & 1 deletion src/Testcontainers/Builders/IContainerBuilder`2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ public interface IContainerBuilder<out TBuilderEntity, out TContainerEntity> : I
/// <param name="outputConsumer">The output consumer.</param>
/// <returns>A configured instance of <typeparamref name="TBuilderEntity" />.</returns>
[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);

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public UntilMessageIsLogged(Regex pattern)

public async Task<bool> 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);
Expand Down

0 comments on commit 0c72125

Please sign in to comment.