testhelper

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBeTrue added in v0.5.1

func CheckBeTrue(b bool)

func CheckEqual added in v0.5.1

func CheckEqual(obj1 interface{}, obj2 interface{})

func CheckErr added in v0.5.1

func CheckErr(err error)

func CheckExit0 added in v0.5.1

func CheckExit0(sess *gexec.Session, waitTime time.Duration)

func CheckFuncBeTrue added in v0.5.1

func CheckFuncBeTrue(f func() bool, t time.Duration)

func CheckNotBeTrue added in v0.5.1

func CheckNotBeTrue(b bool)

func CheckNotEqual added in v0.5.1

func CheckNotEqual(obj1 interface{}, obj2 interface{})

func CheckNotExit0 added in v0.5.1

func CheckNotExit0(sess *gexec.Session, waitTime time.Duration)

func CheckNotNil added in v0.5.1

func CheckNotNil(obj interface{})

func CreateTempFile added in v0.1.5

func CreateTempFile() string

func DeleteFileLocally added in v0.2.0

func DeleteFileLocally(filePath string)

DeleteFileLocally delete file for cloud apply

func GetFileDataLocally added in v0.2.0

func GetFileDataLocally(filePath string) string

GetFileDataLocally get file data for cloud apply

func GetPwd

func GetPwd() string

func IsFileExist added in v0.1.5

func IsFileExist(filename string) bool

func MarshalYamlToFile added in v0.2.0

func MarshalYamlToFile(file string, obj interface{}) error

func RemoveTempFile added in v0.1.5

func RemoveTempFile(file string)

func RunCmdAndCheckResult

func RunCmdAndCheckResult(cmdLine string, expectedCode int) *gexec.Session

RunCmdAndCheckResult start cmd and check expectedCode

func Start

func Start(cmdLine string) (*gexec.Session, error)

Start sealer cmd and return *gexec.Session

func UnmarshalYamlFile added in v0.2.0

func UnmarshalYamlFile(file string, obj interface{}) error

func WriteFile added in v0.1.5

func WriteFile(fileName string, content []byte) error

Types

type SSHClient added in v0.1.5

type SSHClient struct {
	RemoteHostIP string
	SSH          ssh.Interface
}

func NewSSHClientByCluster added in v0.1.5

func NewSSHClientByCluster(usedCluster *v1.Cluster) *SSHClient

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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