Documentation ¶
Overview ¶
Package testlib contains test helpers for goreleaser tests.
Index ¶
- func AssertSkipped(t *testing.T, err error)
- func CatFileFromBareRepository(tb testing.TB, url, name string) []byte
- func CheckPath(tb testing.TB, cmd string)
- func GetFileFromArchive(tb testing.TB, path, format, filename string) []byte
- func GitAdd(tb testing.TB)
- func GitAnnotatedTag(tb testing.TB, tag, message string)
- func GitBranch(tb testing.TB, branch string)
- func GitCheckoutBranch(tb testing.TB, name string)
- func GitCommit(tb testing.TB, msg string)
- func GitInit(tb testing.TB)
- func GitMakeBareRepository(tb testing.TB) string
- func GitRemoteAdd(tb testing.TB, url string)
- func GitRemoteAddWithName(tb testing.TB, remote, url string)
- func GitTag(tb testing.TB, tag string)
- func LsArchive(tb testing.TB, path, format string) []string
- func MakeNewSSHKey(tb testing.TB, algo keygen.KeyType, pass string) string
- func Mktmp(tb testing.TB) string
- func MustDockerPool(f Fataler) *dockertest.Pool
- func MustKillContainer(f Fataler, name string)
- func RequireTemplateError(tb testing.TB, err error)
- func StartRegistry(tb testing.TB, name, port string)
- type Fataler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertSkipped ¶ added in v0.30.0
AssertSkipped asserts that a pipe was skipped.
func CatFileFromBareRepository ¶ added in v1.18.0
func GetFileFromArchive ¶ added in v1.17.0
GetFileFromArchive returns the contents of filename inside the given archive path.
func GitAnnotatedTag ¶ added in v1.2.0
GitAnnotatedTag creates an annotated tag.
func GitCheckoutBranch ¶ added in v0.89.0
GitCheckoutBranch allows us to change the active branch that we're using.
func GitMakeBareRepository ¶ added in v1.18.0
func GitRemoteAdd ¶
GitRemoteAdd adds the given url as remote.
func GitRemoteAddWithName ¶ added in v0.180.0
GitRemoteAddWithName adds the given url as remote with given name.
func LsArchive ¶ added in v1.17.0
LsArchive return the file list of a given archive in a given formatkj
func MakeNewSSHKey ¶ added in v1.18.0
func Mktmp ¶
Mktmp creates a new tempdir, cd into it and provides a back function that cd into the previous directory.
func MustDockerPool ¶ added in v1.14.0
func MustDockerPool(f Fataler) *dockertest.Pool
MustDockerPool gets a single dockertet.Pool.
func MustKillContainer ¶ added in v1.14.0
MustKillContainer kills the given container by name if it exists in the current dockertest.Pool.
func RequireTemplateError ¶ added in v1.11.0
RequireTemplateError requires thqt an error happens and that it is a template error.
func StartRegistry ¶ added in v1.15.0
StartRegistry starts a registry with the given name in the given port, and sets up its deletion on test.Cleanup.