Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Verbose option on testcli.Runner #2183

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Conversation

denik
Copy link
Contributor

@denik denik commented Jan 20, 2025

Changes

Setting Verbose=false on testcli.Runner disables all logging related to running process (stdout, stderr, error, args).

I'm using this in #2184 where I'm using testcli runner to run acceptance tests and seeing all output is not useful.

Tests

Manually inspecting test output in #2184

@@ -39,6 +39,8 @@ type Runner struct {
StderrLines <-chan string

errch <-chan error

NoLog bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you flip this around and name it "LogOutput"? It can initialize to true from NewRunner.

It avoids the double negation in conditionals.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, changed to Verbose.

@denik denik temporarily deployed to test-trigger-is January 20, 2025 08:49 — with GitHub Actions Inactive
@denik denik requested a review from pietern January 20, 2025 08:50
@denik denik enabled auto-merge January 20, 2025 08:50
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update PR title and summary before merging.

@pietern pietern disabled auto-merge January 20, 2025 08:52
@denik denik merged commit 64fc1c8 into main Jan 20, 2025
8 of 9 checks passed
@denik denik deleted the denik/nolog-option-in-testrunner branch January 20, 2025 08:57
@denik denik changed the title Add NoLog option on testcli.Runner Add Verbose option on testcli.Runner Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants