diff --git a/README.md b/README.md index 3c6bf74346..071640355b 100644 --- a/README.md +++ b/README.md @@ -432,36 +432,9 @@ res, err := rdb.Do(ctx, "set", "key", "value").Result() ## Run the test -go-redis will start a redis-server and run the test cases. - -The paths of redis-server bin file and redis config file are defined in `main_test.go`: - -```go -var ( - redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server")) - redisServerConf, _ = filepath.Abs(filepath.Join("testdata", "redis", "redis.conf")) -) -``` - -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/`: - -```shell -ln -s /usr/bin/redis-server ./go-redis/testdata/redis/src -cp ./go-redis/testdata/redis.conf ./go-redis/testdata/redis/ -``` - -Lastly, run: - -```shell -go test -``` - -Another option is to run your specific tests with an already running redis. The example below, tests -against a redis running on port 9999.: - +Recommended to use Docker, just need to run: ```shell -REDIS_PORT=9999 go test +make test ``` ## See also