diff --git a/.gitignore b/.gitignore index 5959942e..ebfe903b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ *.rdb -.test/ +testdata/*/ diff --git a/Makefile b/Makefile index e9fdd93b..03d8959e 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ all: testdeps go test ./... -test.v -test.cpu=1,2,4 go test ./... -test.v -test.short -test.race -testdeps: .test/redis/src/redis-server +testdeps: testdata/redis/src/redis-server .PHONY: all test testdeps -.test/redis: +testdata/redis: mkdir -p $@ wget -qO- https://github.com/antirez/redis/archive/unstable.tar.gz | tar xvz --strip-components=1 -C $@ -.test/redis/src/redis-server: .test/redis +testdata/redis/src/redis-server: testdata/redis cd $< && make all diff --git a/main_test.go b/main_test.go index d298dd21..e1d65c6a 100644 --- a/main_test.go +++ b/main_test.go @@ -171,12 +171,12 @@ func (p *redisProcess) Close() error { } var ( - redisServerBin, _ = filepath.Abs(filepath.Join(".test", "redis", "src", "redis-server")) - redisServerConf, _ = filepath.Abs(filepath.Join(".test", "redis.conf")) + redisServerBin, _ = filepath.Abs(filepath.Join("testdata", "redis", "src", "redis-server")) + redisServerConf, _ = filepath.Abs(filepath.Join("testdata", "redis.conf")) ) func redisDir(port string) (string, error) { - dir, err := filepath.Abs(filepath.Join(".test", "instances", port)) + dir, err := filepath.Abs(filepath.Join("testdata", "instances", port)) if err != nil { return "", err } diff --git a/.test/redis.conf b/testdata/redis.conf similarity index 100% rename from .test/redis.conf rename to testdata/redis.conf