From 846479e6bcf8238879546534b09e141b9bb668f8 Mon Sep 17 00:00:00 2001 From: omagdy Date: Sun, 20 Jul 2025 16:29:34 +0300 Subject: feat: Added parsing of simple command line arguments and CONFIG GET command implementation --- tests/test_commands.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') 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 { 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] -- cgit v1.2.3