aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoromagdy <omar.professional8777@gmail.com>2025-07-20 16:29:34 +0300
committeromagdy <omar.professional8777@gmail.com>2025-07-20 16:29:34 +0300
commit846479e6bcf8238879546534b09e141b9bb668f8 (patch)
treeac2e65b5842bea095107c0a750843d0cf7bc74b4 /tests
parent38b649ea16d8ed053fd9222bfb9867e3432ee2a6 (diff)
downloadredis-rust-846479e6bcf8238879546534b09e141b9bb668f8.tar.xz
redis-rust-846479e6bcf8238879546534b09e141b9bb668f8.zip
feat: Added parsing of simple command line arguments and CONFIG GET command implementation
Diffstat (limited to 'tests')
-rw-r--r--tests/test_commands.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_commands.rs b/tests/test_commands.rs
index 10e6c9c..1031c8b 100644
--- a/tests/test_commands.rs
+++ b/tests/test_commands.rs
@@ -141,7 +141,7 @@ mod command_parser_tests {
/// Tests for the command execution logic in `RedisCommands::execute`.
mod command_execution_tests {
- use codecrafters_redis::resp_commands::RedisCommands;
+ use codecrafters_redis::{resp_commands::RedisCommands, Config};
use std::time::Duration;
use super::*;
@@ -149,7 +149,8 @@ mod command_execution_tests {
/// Helper to parse and execute a command against a cache.
fn run_command(cache: &SharedCache, args: &[&str]) -> Vec<u8> {
let command = RedisCommands::from(build_command_from_str_slice(args));
- command.execute(Arc::clone(cache))
+ let config = Arc::new(Some(Config::default()));
+ command.execute(Arc::clone(cache), config)
}
#[test]