|
5 | 5 | [](https://redis.uptrace.dev/)
|
6 | 6 | [](https://discord.gg/rWtp5Aj)
|
7 | 7 |
|
8 |
| -> :heart: [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev) |
| 8 | +> :heart: |
| 9 | +> [**Uptrace.dev** - distributed traces, logs, and errors in one place](https://uptrace.dev?utm_source=gh-redis&utm_campaign=gh-redis-var1) |
9 | 10 |
|
10 | 11 | - Join [Discord](https://discord.gg/rWtp5Aj) to ask questions.
|
11 | 12 | - [Documentation](https://redis.uptrace.dev)
|
@@ -129,24 +130,30 @@ vals, err := rdb.Eval(ctx, "return {KEYS[1],ARGV[1]}", []string{"key"}, "hello")
|
129 | 130 | // custom command
|
130 | 131 | res, err := rdb.Do(ctx, "set", "key", "value").Result()
|
131 | 132 | ```
|
| 133 | + |
132 | 134 | ## Run the test
|
133 |
| -go-redis will start a redis-server and run the test cases. |
| 135 | + |
| 136 | +go-redis will start a redis-server and run the test cases. |
134 | 137 |
|
135 | 138 | The paths of redis-server bin file and redis config file are definded in `main_test.go`:
|
| 139 | + |
136 | 140 | ```
|
137 | 141 | var (
|
138 | 142 | redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server"))
|
139 | 143 | redisServerConf, _ = filepath.Abs(filepath.Join("testdata", "redis", "redis.conf"))
|
140 | 144 | )
|
141 | 145 | ```
|
142 | 146 |
|
143 |
| -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/`: |
| 147 | +For local testing, you can change the variables to refer to your local files, or create a soft link |
| 148 | +to the corresponding folder for redis-server and copy the config file to `testdata/redis/`: |
| 149 | + |
144 | 150 | ```
|
145 | 151 | ln -s /usr/bin/redis-server ./go-redis/testdata/redis/src
|
146 | 152 | cp ./go-redis/testdata/redis.conf ./go-redis/testdata/redis/
|
147 | 153 | ```
|
148 | 154 |
|
149 | 155 | Lastly, run:
|
| 156 | + |
150 | 157 | ```
|
151 | 158 | go test
|
152 | 159 | ```
|
|
0 commit comments