test

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: May 15, 2015 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeepEquals check.Checker = &eventsChecker{
	&check.CheckerInfo{Name: "DeepEquals", Params: []string{"got", "expected"}},
}
View Source
var FileEquals check.Checker = &fileChecker{
	&check.CheckerInfo{Name: "FileEquals", Params: []string{"got", "expected"}},
}
View Source
var RootDir string
View Source
var Ts, _ = time.Parse("2006-01-02 15:04:05", "2013-12-30 18:36:00")

Functions

func ClearDir added in v1.0.11

func ClearDir(path ...string) error

func ConnectMySQL

func ConnectMySQL(dsn string) (*sql.DB, error)

func CopyFile

func CopyFile(src, dst string) error

func Debug

func Debug(logChan chan *proto.LogEntry)

func DrainBoolChan

func DrainBoolChan(c chan bool)

func DrainDataChan added in v1.0.7

func DrainDataChan(c chan []byte)

func DrainLogChan

func DrainLogChan(c chan *proto.LogEntry)

func DrainRecvChan

func DrainRecvChan(c chan *proto.Reply)

func DrainRecvData added in v1.0.7

func DrainRecvData(c chan interface{})

func DrainSendChan

func DrainSendChan(c chan *proto.Cmd)

func DrainTraceChan

func DrainTraceChan(c chan string) []string

func Dump

func Dump(v interface{})

func FileExists

func FileExists(file string) bool

func FileSize

func FileSize(fileName string) (int64, error)

func GetStatus

func GetStatus(sendChan chan *proto.Cmd, recvChan chan *proto.Reply) map[string]string

func IsDeeply

func IsDeeply(got, expect interface{}) (result bool, error string)

func LoadMmReport

func LoadMmReport(file string, v interface{}) error

func Sign

func Sign(file string) ([]byte, []byte, error)

func WaitBytes

func WaitBytes(dataChan chan []byte) [][]byte

func WaitCmd

func WaitCmd(replyChan chan *proto.Cmd) []proto.Cmd

func WaitCollection

func WaitCollection(cChan chan *mm.Collection, n int) []*mm.Collection

func WaitData

func WaitData(recvDataChan chan interface{}) []interface{}

func WaitErr

func WaitErr(errChan chan error) []error

func WaitFileSize

func WaitFileSize(fileName string, originalSize int64)

func WaitFiles

func WaitFiles(dir string, n int) []os.FileInfo

func WaitLog

func WaitLog(recvDataChan chan interface{}, want int) []proto.LogEntry

func WaitLogChan

func WaitLogChan(logChan chan *proto.LogEntry, n int) []proto.LogEntry

func WaitMmReport

func WaitMmReport(dataChan chan interface{}) *mm.Report

func WaitReply

func WaitReply(replyChan chan *proto.Reply) []proto.Reply

func WaitState

func WaitState(c chan bool) bool

func WaitStatus

func WaitStatus(timeout int, r pct.StatusReporter, proc string, state string) bool

func WaitStatusPrefix

func WaitStatusPrefix(timeout int, r pct.StatusReporter, proc string, state string) bool

func WaitStatusReply

func WaitStatusReply(replyChan chan *proto.Reply) map[string]string

func WaitSystemConfig

func WaitSystemConfig(cChan chan *sysconfig.Report, n int) []*sysconfig.Report

func WaitTrace

func WaitTrace(traceChan chan string) []string

func WriteData

func WriteData(data interface{}, filename string)

Types

type ByInternalService added in v1.0.13

type ByInternalService []proto.AgentConfig

func (ByInternalService) Len added in v1.0.13

func (a ByInternalService) Len() int

func (ByInternalService) Less added in v1.0.13

func (a ByInternalService) Less(i, j int) bool

func (ByInternalService) Swap added in v1.0.13

func (a ByInternalService) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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