diff --git a/README.md b/README.md index e0866536..e7562f3d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ [![Documentation](https://img.shields.io/badge/redis-documentation-informational)](https://redis.uptrace.dev/) [![Chat](https://discordapp.com/api/guilds/752070105847955518/widget.png)](https://discord.gg/rWtp5Aj) -> :heart: [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev) +> :heart: +> [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev?utm_source=gh-redis&utm_campaign=gh-redis-var1) - Join [Discord](https://discord.gg/rWtp5Aj) to ask questions. - [Documentation](https://redis.uptrace.dev) @@ -129,10 +130,13 @@ vals, err := rdb.Eval(ctx, "return {KEYS[1],ARGV[1]}", []string{"key"}, "hello") // custom command res, err := rdb.Do(ctx, "set", "key", "value").Result() ``` + ## Run the test -go-redis will start a redis-server and run the test cases. + +go-redis will start a redis-server and run the test cases. The paths of redis-server bin file and redis config file are definded in `main_test.go`: + ``` var ( redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server")) @@ -140,13 +144,16 @@ var ( ) ``` -For local testing, you can change the variables to refer to your local files, or create a soft link to the corresponding folder for redis-server and copy the config file to `testdata/redis/`: +For local testing, you can change the variables to refer to your local files, or create a soft link +to the corresponding folder for redis-server and copy the config file to `testdata/redis/`: + ``` ln -s /usr/bin/redis-server ./go-redis/testdata/redis/src cp ./go-redis/testdata/redis.conf ./go-redis/testdata/redis/ ``` Lastly, run: + ``` go test ```