Documentation ¶
Index ¶
- Variables
- func NeedsExternalNetwork(t *testing.T)
- func NeedsGit(t *testing.T)
- type Helper
- func (h *Helper) Cd(dir string)
- func (h *Helper) Cleanup()
- func (h *Helper) DoRun(args []string) error
- func (h *Helper) GetCommit(repo string) string
- func (h *Helper) Must(err error)
- func (h *Helper) MustExist(path string)
- func (h *Helper) MustNotExist(path string)
- func (h *Helper) Path(name string) string
- func (h *Helper) ReadLock() string
- func (h *Helper) ReadManifest() string
- func (h *Helper) Run(args ...string)
- func (h *Helper) RunGit(dir string, args ...string)
- func (h *Helper) RunGo(args ...string)
- func (h *Helper) Setenv(name, val string)
- func (h *Helper) TempDir(path string)
- func (h *Helper) TempFile(path, contents string)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ExeSuffix string // ".exe" on Windows
)
Functions ¶
func NeedsExternalNetwork ¶
NeedsExternalNetwork makes sure the tests needing external network will not be run when executing tests in short mode.
Types ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
Helper with utilities for testing.
func (*Helper) Cd ¶
Cd changes the current directory to the named directory. Note that using this means that the test must not be run in parallel with any other tests.
func (*Helper) DoRun ¶
DoRun runs the test go command, recording stdout and stderr and returning exit status.
func (*Helper) MustNotExist ¶
MustNotExist fails if path exists.
func (*Helper) ReadManifest ¶
ReadManifest returns the manifest in the current directory.
func (*Helper) Setenv ¶
Setenv sets an environment variable to use when running the test go command.
Click to show internal directories.
Click to hide internal directories.