chezmoitest

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Umask = os.FileMode(0o022)

Umask is the umask used in tests.

Variables

This section is empty.

Functions

func AGEGenerateKey

func AGEGenerateKey(filename string) (publicKey, privateKeyFile string, err error)

AGEGenerateKey generates and returns an age public key and the path to the private key. If filename is non-zero then the private key is written to it, otherwise a new file is created in a temporary directory and the caller is responsible for removing the temporary directory.

func GPGCommand

func GPGCommand() (string, error)

GPGCommand returns the GPG command, if it can be found.

func GPGGenerateKey

func GPGGenerateKey(command, homeDir string) (key, passphrase string, err error)

GPGGenerateKey generates and returns a GPG key in homeDir.

func GitHubActionsOnWindows

func GitHubActionsOnWindows() bool

GitHubActionsOnWindows returns if running in GitHub Actions on Windows.

func HomeDir

func HomeDir() string

HomeDir returns the home directory.

func JoinLines

func JoinLines(lines ...string) string

JoinLines joins lines with newlines.

func SkipUnlessGOOS

func SkipUnlessGOOS(t *testing.T, name string)

SkipUnlessGOOS calls t.Skip() if name does not match runtime.GOOS.

func WithTestFS

func WithTestFS(t *testing.T, root interface{}, f func(fs vfs.FS))

WithTestFS calls f with a test filesystem populated with root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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