tests

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBareGitRepository added in v0.13.1

func CreateBareGitRepository(repoName string) (string, error)

func ExecuteCommand

func ExecuteCommand(root *cobra.Command, args string) (c *cobra.Command, output string, err error)

func GetFileContent added in v0.13.1

func GetFileContent(repoPath string, fileName string) (string, error)

func MockShellEmpty

func MockShellEmpty() shell.Shell

func MockShellFunc

func MockShellFunc(handler func(repoName string, command string, arguments []string) (string, error)) shell.Shell

MockShellFunc returns a mock of a Shell interface that returns a conditional result based on command and arguments

func MockShellMap

func MockShellMap(handlerValues map[string]MockResult) shell.Shell

func Path

func Path(parts ...string) string

func PrepareBulker

func PrepareBulker(t *testing.T, sh shell.Shell, repos []settings.Repo)

func PrepareBulkerWithGroups

func PrepareBulkerWithGroups(t *testing.T, sh shell.Shell, repos []settings.Repo, groups []settings.Group)

func ShellCommandToString

func ShellCommandToString(command string, arguments []string) string

func ToJsonString

func ToJsonString(value any) string

Types

type MockResult

type MockResult struct {
	Output string
	Error  error
}

Jump to

Keyboard shortcuts

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