testlib

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package testlib contains test helpers for goreleaser tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertSkipped added in v0.30.0

func AssertSkipped(t *testing.T, err error)

AssertSkipped asserts that a pipe was skipped.

func CheckPath added in v0.183.0

func CheckPath(tb testing.TB, cmd string)

CheckPath skips the test if the binary is not in the PATH.

func GitAdd

func GitAdd(tb testing.TB)

GitAdd adds all files to stage.

func GitAnnotatedTag added in v1.2.0

func GitAnnotatedTag(tb testing.TB, tag, message string)

GitAnnotatedTag creates an annotated tag.

func GitBranch added in v0.142.0

func GitBranch(tb testing.TB, branch string)

GitBranch creates a git branch.

func GitCheckoutBranch added in v0.89.0

func GitCheckoutBranch(tb testing.TB, name string)

GitCheckoutBranch allows us to change the active branch that we're using.

func GitCommit

func GitCommit(tb testing.TB, msg string)

GitCommit creates a git commits.

func GitInit

func GitInit(tb testing.TB)

GitInit inits a new git project.

func GitRemoteAdd

func GitRemoteAdd(tb testing.TB, url string)

GitRemoteAdd adds the given url as remote.

func GitRemoteAddWithName added in v0.180.0

func GitRemoteAddWithName(tb testing.TB, remote, url string)

GitRemoteAddWithName adds the given url as remote with given name.

func GitTag

func GitTag(tb testing.TB, tag string)

GitTag creates a git tag.

func Mktmp

func Mktmp(tb testing.TB) string

Mktmp creates a new tempdir, cd into it and provides a back function that cd into the previous directory.

func RequireTemplateError added in v1.11.0

func RequireTemplateError(tb testing.TB, err error)

RequireTemplateError requires thqt an error happens and that it is an template error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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