https://github.com/soh335/go-test-redisserver
redis-server runner for tests.
https://github.com/soh335/go-test-redisserver
golang redis testing
Last synced: 8 months ago
JSON representation
redis-server runner for tests.
- Host: GitHub
- URL: https://github.com/soh335/go-test-redisserver
- Owner: soh335
- License: mit
- Created: 2014-01-25T07:59:00.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2019-09-21T15:53:48.000Z (almost 7 years ago)
- Last Synced: 2025-01-31T07:40:35.605Z (over 1 year ago)
- Topics: golang, redis, testing
- Language: Go
- Size: 21.5 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-test-redisserver
[](https://app.wercker.com/project/bykey/4d86265b7931cc35d0fbca3266df6815)
[](https://godoc.org/github.com/soh335/go-test-redisserver)
redis-server runner for tests. ```go-test-redisserver``` is a port of [Test::RedisServer](https://github.com/typester/Test-RedisServer).
## USAGE
```go
package main
import (
"github.com/soh335/go-test-redisserver"
"github.com/garyburd/redigo/redis"
)
func main() {
s, err := redistest.NewServer(true, nil)
if err != nil {
panic(err)
}
defer s.Stop()
conn, err := redis.Dial("unix", s.Config["unixsocket"])
if err != nil {
panic(err)
}
_, err = conn.Do("PING")
if err != nil {
panic(err)
}
}
```
## LICENSE
* MIT
## SEE ALSO
* [Test::RedisServer](https://github.com/typester/Test-RedisServer)
* [go-test-mysqld](https://github.com/lestrrat/go-test-mysqld)