Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitProvider ¶
type GitProvider interface {
Init(T *testing.T)
CreateRepository(repoName string) *GitRemoteRepo
DeleteRepository(repoName string)
}
func GetGitServer ¶
func GetGitServer(T *testing.T) GitProvider
type GitRemoteRepo ¶
type GitTestServerProvider ¶
type GitTestServerProvider struct {
PodName string
ServiceUrl string
Kubectl *TestExecCmd
// contains filtered or unexported fields
}
func (*GitTestServerProvider) CreateRepository ¶
func (g *GitTestServerProvider) CreateRepository(repoName string) *GitRemoteRepo
func (*GitTestServerProvider) DeleteRepository ¶
func (g *GitTestServerProvider) DeleteRepository(repoName string)
func (*GitTestServerProvider) Init ¶
func (g *GitTestServerProvider) Init(T *testing.T)
type TestExecCmd ¶
type TestExecCmd struct {
// binary to invoke
// Example: "func", "kn", "kubectl", "/usr/bin/sh"
Binary string
// Binary args to append before actual args. Examples:
// when 'kn' binary binaryArgs should be ["func"]
BinaryArgs []string
// Run commands from Dir
SourceDir string
// Indicates shell should dump command line args during execution
ShouldDumpCmdLine bool
// Indicates shell should dump
ShouldDumpOnSuccess bool
// Fail Test on Error
ShouldFailOnError bool
// Environment variable to be used with the command
Env []string
// Optional function to be used to dump stdout command results
DumpLogger func(out string)
// Boolean
T *testing.T
}
func NewKnFuncShellCli ¶
func NewKnFuncShellCli(t *testing.T) *TestExecCmd
func NewShellCmd ¶
func NewShellCmd(t *testing.T, fromDirectory string) *TestExecCmd
func (*TestExecCmd) Exec ¶
func (f *TestExecCmd) Exec(args ...string) TestExecCmdResult
Exec invokes go exec library and runs a shell command combining the binary args with args from method signature
func (*TestExecCmd) FromDir ¶
func (f *TestExecCmd) FromDir(dir string) *TestExecCmd
func (*TestExecCmd) Run ¶
func (f *TestExecCmd) Run(oneArgs string) TestExecCmdResult
func (*TestExecCmd) WithEnv ¶
func (f *TestExecCmd) WithEnv(envKey string, envValue string) *TestExecCmd
type TestExecCmdResult ¶
TestExecCmdResult stored command result
Click to show internal directories.
Click to hide internal directories.