redis-server runner for tests.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 19 commits behind soh335:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis.yml
README.md
redistest.go
redistest_test.go

README.md

go-test-redisserver

Build Status GoDoc

redis-server runner for tests. go-test-redisserver is a port of Test::RedisServer.

USAGE

package main

import (
        "github.com/soh335/go-test-redisserver"
        "github.com/garyburd/redigo/redis"
)

func main() {
        s, err := redistest.NewServer(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)
        }
}

SEE ALSO