add project
This commit is contained in:
14
ServiceTest/start_daemon_with_config.sh
Normal file
14
ServiceTest/start_daemon_with_config.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Usage: ./start_daemon_with_config.sh /path/to/redismanager.json
|
||||
|
||||
CONFIG_PATH="$1"
|
||||
if [ -z "$CONFIG_PATH" ]; then
|
||||
echo "Usage: $0 /path/to/redismanager.json"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Start the daemon with the specified config file
|
||||
# Assumes the daemon reads config via an environment variable
|
||||
export REDISMANAGER_CONFIG="$CONFIG_PATH"
|
||||
dotnet run --project ../RedisManager
|
||||
18
ServiceTest/string_command_test.sh
Executable file
18
ServiceTest/string_command_test.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Test SET command
|
||||
set_output=$(dotnet run --project ../RedisManager.csproj set -i default testkey testvalue)
|
||||
if [[ "$set_output" != *"OK"* ]]; then
|
||||
echo "SET command failed: $set_output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test GET command
|
||||
get_output=$(dotnet run --project ../RedisManager.csproj get -i default testkey)
|
||||
if [[ "$get_output" != *"testvalue"* ]]; then
|
||||
echo "GET command failed: $get_output"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "String command test passed"
|
||||
Reference in New Issue
Block a user