diff --git a/io-engine/src/bin/io-engine-client/v1/test_cli.rs b/io-engine/src/bin/io-engine-client/v1/test_cli.rs index c8484bbe7..2ee317754 100644 --- a/io-engine/src/bin/io-engine-client/v1/test_cli.rs +++ b/io-engine/src/bin/io-engine-client/v1/test_cli.rs @@ -16,6 +16,8 @@ use strum_macros::{AsRefStr, EnumString, EnumVariantNames}; use tonic::Status; pub fn subcommands() -> Command { + let features = Command::new("features").about("Get the test features"); + let inject = Command::new("inject") .about("manage fault injections") .arg( @@ -89,6 +91,7 @@ pub fn subcommands() -> Command { .subcommand_required(true) .arg_required_else_help(true) .about("Test management") + .subcommand(features) .subcommand(inject) .subcommand(wipe) } @@ -144,6 +147,7 @@ impl From for v1_rpc::test::wipe_options::CheckSumAlgorithm { pub async fn handler(ctx: Context, matches: &ArgMatches) -> crate::Result<()> { match matches.subcommand().unwrap() { ("inject", args) => injections(ctx, args).await, + ("features", args) => features(ctx, args).await, ("wipe", args) => wipe(ctx, args).await, (cmd, _) => { Err(Status::not_found(format!("command {cmd} does not exist"))) @@ -152,6 +156,23 @@ pub async fn handler(ctx: Context, matches: &ArgMatches) -> crate::Result<()> { } } +async fn features( + mut ctx: Context, + _matches: &ArgMatches, +) -> crate::Result<()> { + let response = ctx.v1.test.get_features(()).await.context(GrpcStatus)?; + let features = response.into_inner(); + match ctx.output { + OutputFormat::Json => { + println!("{}", serde_json::to_string_pretty(&features).unwrap()); + } + OutputFormat::Default => { + println!("{features:#?}"); + } + } + Ok(()) +} + async fn wipe(ctx: Context, matches: &ArgMatches) -> crate::Result<()> { let resource = matches .get_one::("resource") @@ -204,6 +225,7 @@ async fn replica_wipe( ) .map_err(|s| Status::invalid_argument(format!("Bad size '{s}'"))) .context(GrpcStatus)?; + let response = ctx .v1 .test diff --git a/utils/dependencies b/utils/dependencies index 8e79cb402..dca05e39e 160000 --- a/utils/dependencies +++ b/utils/dependencies @@ -1 +1 @@ -Subproject commit 8e79cb402f4c71acca1fcd0be2e1800c73edd657 +Subproject commit dca05e39e032c15275a48e00feb0983b152338c1