contract

package
v0.0.0-...-bff8077 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2013 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ignored         = "ignored"
	Passed          = "passed"
	Failed          = "failed"
	Panicked        = "panicked"
	BuildFailure    = "build failure"
	NoTestFiles     = "no test files"
	NoTestFunctions = "no test functions"
	NoGoFiles       = "no go code"
)

Functions

This section is empty.

Types

type CompleteOutput

type CompleteOutput struct {
	Packages []*PackageResult
	Revision string
}

type Executor

type Executor interface {
	ExecuteTests([]*Package) *CompleteOutput
	Status() string
}

type FileSystem

type FileSystem interface {
	Walk(root string, step filepath.WalkFunc)
	Listing(directory string) ([]os.FileInfo, error)
	Exists(directory string) bool
}

type Monitor

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

func NewMonitor

func NewMonitor(scanner Scanner, watcher Watcher, executor Executor, server Server, sleep func()) *Monitor

func (*Monitor) Scan

func (self *Monitor) Scan()

func (*Monitor) ScanForever

func (self *Monitor) ScanForever()

type Package

type Package struct {
	Active bool
	Path   string
	Name   string
	Error  error
	Output string
	Result *PackageResult
}

func NewPackage

func NewPackage(path string) *Package

type PackageResult

type PackageResult struct {
	PackageName string
	Elapsed     float64
	Coverage    float64
	Outcome     string
	BuildOutput string
	TestResults []TestResult
}

func NewPackageResult

func NewPackageResult(packageName string) *PackageResult

type Scanner

type Scanner interface {
	Scan() (changed bool)
}

type Server

type Server interface {
	ReceiveUpdate(*CompleteOutput)
	Watch(writer http.ResponseWriter, request *http.Request)
	Ignore(writer http.ResponseWriter, request *http.Request)
	Reinstate(writer http.ResponseWriter, request *http.Request)
	Status(writer http.ResponseWriter, request *http.Request)
	LongPollStatus(writer http.ResponseWriter, request *http.Request)
	Results(writer http.ResponseWriter, request *http.Request)
	Execute(writer http.ResponseWriter, request *http.Request)
}

type Shell

type Shell interface {
	GoTest(directory string) (output string, err error)
	Getenv(key string) string
	Setenv(key, value string) error
}

type TestResult

type TestResult struct {
	TestName string
	Elapsed  float64
	Passed   bool
	Skipped  bool
	File     string
	Line     int
	Message  string
	Error    string
	Stories  []reporting.ScopeResult

	RawLines []string `json:",omitempty"`
}

func NewTestResult

func NewTestResult(testName string) *TestResult

type Watcher

type Watcher interface {
	Root() string
	Adjust(root string) error

	Deletion(folder string)
	Creation(folder string)

	Ignore(folder string)
	Reinstate(folder string)

	WatchedFolders() []*Package
	IsWatched(folder string) bool
	IsIgnored(folder string) bool
}

Jump to

Keyboard shortcuts

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