Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soh335/go-test-redisserver
redis-server runner for tests.
https://github.com/soh335/go-test-redisserver
golang redis testing
Last synced: about 1 month 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 (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-09-21T15:53:48.000Z (about 5 years ago)
- Last Synced: 2024-06-19T01:59:40.317Z (5 months 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
[![wercker status](https://app.wercker.com/status/4d86265b7931cc35d0fbca3266df6815/s/master "wercker status")](https://app.wercker.com/project/bykey/4d86265b7931cc35d0fbca3266df6815)
[![GoDoc](https://godoc.org/github.com/soh335/go-test-redisserver?status.svg)](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 mainimport (
"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)