Documentation
¶
Index ¶
- func AnalyzePods(client kubectl.Client, namespace string, cachedLogger logger.Logger) error
- func Capture() func() (string, error)
- func ChangeWorkingDir(pwd string, cachedLogger logger.Logger) error
- func Copy(src, dest string) error
- func CreateTempDir() (dirPath string, dirName string, err error)
- func DeleteNamespace(client kubectl.Client, namespace string)
- func DeleteTempAndResetWorkingDir(tmpDir string, pwd string, log logger.Logger)
- func DeleteTempDir(dirPath string, log logger.Logger)
- func Equal(a, b []string) bool
- func GenerateNamespaceName(prefix string) string
- func LookForDeployment(client kubectl.Client, namespace string, expectedDeployment ...string) (bool, error)
- func PortForwardAndPing(config *latest.Config, generatedConfig *generated.Config, ...) error
- func PrintTestResult(testName string, subTestName string, err error, log logger.Logger)
- func PurgeNamespacesByPrefixes(nsPrefixes []string) error
- func SpaceExists(str string, list []*latestSpace.Space) bool
- func StringInSlice(str string, list []string) bool
- type BaseCustomFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzePods ¶
AnalyzePods waits for the pods to be running (if possible) and healthcheck them
func Capture ¶
Capture replaces os.Stdout with a writer that buffers any data written to os.Stdout. Call the returned function to cleanup and get the data as a string.
func ChangeWorkingDir ¶
ChangeWorkingDir changes the working directory
func CreateTempDir ¶
CreateTempDir creates a temp directory in /tmp
func DeleteNamespace ¶
DeleteNamespace deletes a given namespace and waits for the process to finish
func DeleteTempAndResetWorkingDir ¶
DeleteTempAndResetWorkingDir deletes /tmp dir and reinitialize the working dir
func DeleteTempDir ¶
DeleteTempDir deletes temp directory
func GenerateNamespaceName ¶
GenerateNamespaceName generates a new Namespace name with the given prefix and a random suffix
func LookForDeployment ¶
func LookForDeployment(client kubectl.Client, namespace string, expectedDeployment ...string) (bool, error)
LookForDeployment search for a specific deployment name among the deployments, returns true if found
func PortForwardAndPing ¶
func PortForwardAndPing(config *latest.Config, generatedConfig *generated.Config, client kubectl.Client, cachedLogger logger.Logger) error
PortForwardAndPing creates port-forwardings and ping them for a 200 status code
func PrintTestResult ¶
PrintTestResult prints a test result with a specific formatting
func PurgeNamespacesByPrefixes ¶
PurgeNamespacesByPrefixes deletes the namespaces that were created during testing process
func SpaceExists ¶
func SpaceExists(str string, list []*latestSpace.Space) bool
SpaceExists checks if a string is in a slice
func StringInSlice ¶
StringInSlice checks if a string is in a slice
Types ¶
type BaseCustomFactory ¶
type BaseCustomFactory struct {
*factory.DefaultFactoryImpl
CacheLogger logger.Logger
Buff *bytes.Buffer
Verbose bool
Timeout int
Namespace string
Pwd string
Client kubectl.Client
DirPath string
DirName string
}
BaseCustomFactory is a factory override for testing
func (*BaseCustomFactory) GetLog ¶
func (b *BaseCustomFactory) GetLog() logger.Logger
GetLog implements interface
func (*BaseCustomFactory) GetLogContents ¶
func (b *BaseCustomFactory) GetLogContents() string