test

package
v0.0.0-...-69e45e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

テスト用。

Index

Constants

This section is empty.

Variables

View Source
var (
	// 実行可能な redis-server。
	RedisPath = "redis-server"
)

Functions

func FreePort

func FreePort() (port int, err error)

Types

type HttpServer

type HttpServer struct {
	*httptest.Server
	// contains filtered or unexported fields
}

テスト用の HTTP サーバー。

func NewHttpServer

func NewHttpServer(timeout time.Duration) (*HttpServer, error)

func (*HttpServer) AddResponse

func (this *HttpServer) AddResponse(status int, header http.Header, body []byte) <-chan *http.Request

次に返させるレスポンスを与える。

func (*HttpServer) Close

func (this *HttpServer) Close()

待ち受けソケットを閉じる。

type RedisServer

type RedisServer struct {
	// contains filtered or unexported fields
}

func NewRedisServer

func NewRedisServer() (*RedisServer, error)

func (*RedisServer) Address

func (this *RedisServer) Address() string

func (*RedisServer) Close

func (this *RedisServer) Close()

func (*RedisServer) Pool

func (this *RedisServer) Pool() *redis.Pool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL