testhelper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const TestPath = "/tmp/git-commit-hook"

TestPath holds the absolute path to the test folder

View Source
const TestPathGitFolder = "/tmp/git-commit-hook/.git"

TestPathGitFolder holds the .git folder for the test

View Source
const TestPathHooksFolder = "/tmp/git-commit-hook/.git/hooks"

TestPathHooksFolder holds the hooks folder inside the .git folder for the test

Variables

This section is empty.

Functions

func CleanupTestEnvironment

func CleanupTestEnvironment(t *testing.T)

CleanupTestEnvironment removes all test folders

func Git

func Git(t *testing.T, args ...string)

Git executes a git command

func InitGitRepository

func InitGitRepository(t *testing.T, branchName string)

InitGitRepository initializes a test git repository with the given branch name in the current directory

func InitTestFolder

func InitTestFolder(t *testing.T)

InitTestFolder cleans up an eventually existing folder, creates it again and changes working dir to that folder

func PreapreTestEnvironment

func PreapreTestEnvironment(t *testing.T)

PreapreTestEnvironment writes a test config file to the test folder

func WriteConfigFile

func WriteConfigFile(t *testing.T, dir string)

WriteConfigFile writes a test config file into the given folder

Types

This section is empty.

Jump to

Keyboard shortcuts

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