Skip to content

Reading console output #594

Answered by HofmeisterAn
ArminOebb asked this question in Q&A
Sep 27, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Something like WithOutputConsumer?

public async Task OutputConsumer()
{
// Given
var unixTimeInMilliseconds = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString(CultureInfo.InvariantCulture);
using (var consumer = Consume.RedirectStdoutAndStderrToStream(new MemoryStream(), new MemoryStream()))
{
// When
var testcontainersBuilder = new TestcontainersBuilder<TestcontainersContainer>()
.WithImage("alpine")
.WithEntrypoint("/bin/sh", "-c", $"printf \"{unixTimeInMilliseconds}\" | tee /dev/stderr && ta…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ArminOebb
Comment options

@HofmeisterAn
Comment options

Answer selected by HofmeisterAn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants