gittest

package
v0.0.0-...-7c37f04 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gittest is a test package for the git middleware. It implements a mock gitos.OS, gitos.Cmd and gitos.File.

Index

Constants

This section is empty.

Variables

View Source
var CmdOutput = "success"

CmdOutput is the output of any call to the mocked gitos.Cmd's Output().

View Source
var FakeOS = fakeOS{}

FakeOS implements a mock gitos.OS, gitos.Cmd and gitos.File.

View Source
var TempFileName = "tempfile"

TempFileName is the name of any file returned by mocked gitos.OS's TempFile().

View Source
var TimeSpeed = 5

TimeSpeed is how faster the mocked gitos.Ticker and gitos.Sleep should run.

Functions

func NewLogger

func NewLogger(f gitos.File) *log.Logger

NewLogger creates a logger that logs to f

func Open

func Open(name string) gitos.File

Open creates a new mock gitos.File.

func Sleep

func Sleep(d time.Duration)

Sleep calls fake time.Sleep

Types

This section is empty.

Jump to

Keyboard shortcuts

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