Skip to content

Commit

Permalink
Merge branch 'valkey-io:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
KarthikSubbarao authored Dec 4, 2024
2 parents 1622b4c + 395b564 commit 88eb602
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions examples/test_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ fn test_helper_command_name(ctx: &Context, _args: Vec<ValkeyString>) -> ValkeyRe
Ok(ctx.current_command_name()?.into())
}

fn test_helper_err(ctx: &Context, args: Vec<ValkeyString>) -> ValkeyResult {
if args.len() < 1 {
fn test_helper_err(_ctx: &Context, args: Vec<ValkeyString>) -> ValkeyResult {
if args.len() < 2 {
return Err(ValkeyError::WrongArity);
}

let msg = args.get(1).unwrap();

ctx.reply_error_string(msg.try_as_str().unwrap());
Ok(().into())
Err(ValkeyError::Str(msg.try_as_str().unwrap()))
}

fn add_info_impl(ctx: &InfoContext, _for_crash_report: bool) -> ValkeyResult<()> {
Expand Down
3 changes: 2 additions & 1 deletion tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ fn test_helper_version() -> Result<()> {
.with_context(|| "failed to run test_helper.version")?;
assert!(res[0] > 0);

// TODO https://github.com/valkey-io/valkeymodule-rs/issues/14
// Test also an internal implementation that might not always be reached
// TODO: this check is currently disabled because Valkey 8.0.0 returns
// redis_version:7.2.4 and the test expects it to be 8.0.0
// let res2: Vec<i64> = redis::cmd("test_helper._version_rm_call")
// .query(&mut con)
// .with_context(|| "failed to run test_helper._version_rm_call")?;
Expand Down

0 comments on commit 88eb602

Please sign in to comment.