Skip to content

Commit

Permalink
review: update
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Jul 8, 2024
1 parent 6e4f9c5 commit 531fcb1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
3 changes: 1 addition & 2 deletions dev-tools/omdb/src/bin/omdb/oxql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ impl OxqlArgs {
log.new(slog::o!("component" => "clickhouse-client")),
opts,
)
.await?;
Ok(())
.await
}

/// Resolve the ClickHouse URL to a socket address.
Expand Down
11 changes: 5 additions & 6 deletions dev-tools/omdb/tests/env.out
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,14 @@ Caused by:
1: builder error: relative URL without a base
2: relative URL without a base
=============================================
EXECUTING COMMAND: omdb ["oxql", "--metrics-db-url", "junk"]
termination: Exited(2)
EXECUTING COMMAND: omdb ["oxql", "--clickhouse-url", "junk"]
termination: Exited(1)
---------------------------------------------
stdout:
---------------------------------------------
stderr:
error: unexpected argument '--metrics-db-url' found

Usage: omdb oxql [OPTIONS]
Error: failed parsing URL from command-line or environment variable

For more information, try '--help'.
Caused by:
relative URL without a base
=============================================
11 changes: 5 additions & 6 deletions dev-tools/omdb/tests/test_all_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const CMD_OMDB: &str = env!("CARGO_BIN_EXE_omdb");
type ControlPlaneTestContext =
nexus_test_utils::ControlPlaneTestContext<omicron_nexus::Server>;

/// The `oximeter` list-producers command output is not easy to compare as a
/// string directly because the timing of registrations with both our test
/// producer and the one nexus registers. But, let's find our test producer
/// in the list.
fn assert_oximeter_list_producers_output(output: &str, ox_url: &str) {
assert!(
output.contains(format!("Collector ID: {}", OXIMETER_UUID).as_str())
Expand Down Expand Up @@ -317,7 +321,7 @@ async fn test_omdb_env_settings(cptestctx: &ControlPlaneTestContext) {
.await;

// Case: specified in multiple places (command-line argument wins)
let args = &["oxql", "--metrics-db-url", "junk"];
let args = &["oxql", "--clickhouse-url", "junk"];
do_run(
&mut output,
move |exec| exec.env("OMDB_CLICKHOUSE_URL", &ch_url),
Expand All @@ -328,11 +332,6 @@ async fn test_omdb_env_settings(cptestctx: &ControlPlaneTestContext) {

assert_contents("tests/env.out", &output);

// The `oximeter` list-producers command output is not easy to compare as a
// string directly because the timing of registrations with both our test
// producer and the one nexus registers. But, let's find our test producer
// in the list.

// Oximeter URL
// Case 1: specified on the command line.
// Case 2: is covered by the success tests above.
Expand Down

0 comments on commit 531fcb1

Please sign in to comment.