test: do not pass TEST_LOG to log filter in e2e tests (#25761)

pull/25769/head
Trevor Hilton 2025-01-07 19:48:56 -05:00 committed by GitHub
parent 3efd49066e
commit 94b53f9bd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -134,10 +134,10 @@ impl TestServer {
.args(config.as_args())
.stdout(Stdio::piped());
// If TEST_LOG env var is not defined, discard stdout/stderr, otherwise, pass it to the
// inner binary in the "LOG_FILTER" env var:
let emit_logs = if let Ok(val) = std::env::var("TEST_LOG") {
command.env("LOG_FILTER", if val.is_empty() { "info" } else { &val });
// Use the TEST_LOG env var to determine if logs are emitted from the spawned process
let emit_logs = if std::env::var("TEST_LOG").is_ok() {
// use "info" filter, as would be used in production:
command.env("LOG_FILTER", "info");
true
} else {
false