feat: Port end-to-end logging test to NG (#4400)
* feat: Copy end-to-end logging test to NG This was created with: cp influxdb_iox/tests/end_to_end_cases/influxdb_ioxd.rs influxdb_iox/tests/end_to_end_ng_cases/logging.rs * feat: Port logging test to NG end-to-end tests And re-enable it, it was ignored. * fix: Specify that an in-memory catalog should be used for the logging test * fix: Check for gRPC instead of HTTP Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/24376/head
parent
14cb2f5674
commit
117569184e
|
@ -0,0 +1,43 @@
|
|||
use assert_cmd::Command;
|
||||
use predicates::prelude::*;
|
||||
use std::time::Duration;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_logging() {
|
||||
// Testing with querier mode because it has the least amount of setup needed.
|
||||
Command::cargo_bin("influxdb_iox")
|
||||
.unwrap()
|
||||
.args(&[
|
||||
"run",
|
||||
"querier",
|
||||
"--log-filter",
|
||||
"info",
|
||||
"--catalog",
|
||||
"memory",
|
||||
])
|
||||
.timeout(Duration::from_secs(2))
|
||||
.assert()
|
||||
.failure()
|
||||
// Tokio-trace output
|
||||
.stdout(predicate::str::contains("InfluxDB IOx server starting"))
|
||||
// log crate output
|
||||
.stdout(predicate::str::contains("Binding gRPC services"));
|
||||
|
||||
Command::cargo_bin("influxdb_iox")
|
||||
.unwrap()
|
||||
.args(&[
|
||||
"run",
|
||||
"querier",
|
||||
"--log-filter",
|
||||
"error",
|
||||
"--catalog",
|
||||
"memory",
|
||||
])
|
||||
.timeout(Duration::from_secs(2))
|
||||
.assert()
|
||||
.failure()
|
||||
// Tokio-trace output
|
||||
.stdout(predicate::str::contains("InfluxDB IOx server starting").not())
|
||||
// log crate output
|
||||
.stdout(predicate::str::contains("Binding gRPC services").not());
|
||||
}
|
|
@ -2,6 +2,7 @@ mod all_in_one;
|
|||
mod cli;
|
||||
mod debug;
|
||||
mod ingester;
|
||||
mod logging;
|
||||
mod namespace;
|
||||
mod querier;
|
||||
mod schema;
|
||||
|
|
Loading…
Reference in New Issue