common

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 GitRemoteRepo struct {
	RepoName         string
	ExternalCloneURL string
	ClusterCloneURL  string
}

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

type TestExecCmdResult struct {
	Stdout string
	Stderr string
	Error  error
}

TestExecCmdResult stored command result

Jump to

Keyboard shortcuts

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