Documentation ¶
Index ¶
- func AddLabelToCRD(ctx context.Context, crd, label string) error
- func AddLabelToPod(ctx context.Context, podName, namespace, label string) error
- func AddLabelToPv(ctx context.Context, pv, label string) error
- func AddLabelToPvc(ctx context.Context, pvc, namespace, label string) error
- func BuildAddonLabelSelector() string
- func CRDCountShouldBe(ctx context.Context, name string, count int) error
- func CRDShouldExist(ctx context.Context, name string) error
- func CRDShouldNotExist(ctx context.Context, name string) error
- func Check(command string, input string) (string, error)
- func CheckClusterStatus(name, ns string, status string) bool
- func CheckCommand(command string, path string) bool
- func CheckKbcliExists() error
- func CheckPodStatus(name, ns string) map[string]bool
- func Count(filename, substring string) (int, error)
- func CreateFileToPod(ctx context.Context, namespace, podName, volume, filename, content string) error
- func CreateSecretFromFiles(ctx context.Context, client TestClient, namespace string, name string, ...) error
- func DeleteVeleroDs(ctx context.Context) error
- func EnsureClusterExists(ctx context.Context) error
- func ExecCommand(strCommand string) string
- func ExecCommandReadline(strCommand string) []string
- func ExecuteCommand(command string) bool
- func GetAPIVersions(client *TestClient, name string) ([]string, error)
- func GetCRD(ctx context.Context, name string) ([]string, error)
- func GetClusterCreateYaml(files []string) string
- func GetClusterVersion(folder string) (result []string)
- func GetConfig() (*rest.Config, error)
- func GetFiles(path string) ([]string, error)
- func GetFolders(path string) ([]string, error)
- func GetName(fileName string) (name, ns string)
- func GetPrefix(str string, sub string) (s string)
- func GetPvByPvc(ctx context.Context, namespace, pvc string) ([]string, error)
- func GetPvcByPodName(ctx context.Context, namespace, podName string) ([]string, error)
- func KubectlApplyByFile(ctx context.Context, file string) error
- func KubectlConfigUseContext(ctx context.Context, kubectlContext string) error
- func KubectlGetInfo(cmdName string, arg []string)
- func OpsYaml(file string, ops string) bool
- func ReadFileFromPodVolume(ctx context.Context, namespace, podName, volume, filename string) (string, error)
- func ReadLine(fileName string, name string) string
- func ReadLineLast(fileName string, name string) string
- func RemoveElements(arr []string, elemsToRemove []string) []string
- func ReplaceClusterVersionRef(fileName string, clusterVersionRef string)
- func StringSplit(str string) string
- func StringStrip(str string) string
- func UploadToS3(fileName, s3Directory, bucketName string) error
- func WaitForCRDEstablished(crdName string) error
- func WaitForPods(ctx context.Context, client TestClient, namespace string, pods []string) error
- func WaitTime(num int)
- type TestClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddLabelToPod ¶
func BuildAddonLabelSelector ¶
func BuildAddonLabelSelector() string
func CheckClusterStatus ¶
func CheckCommand ¶ added in v0.7.0
func CheckKbcliExists ¶
func CheckKbcliExists() error
func CheckPodStatus ¶
func CreateFileToPod ¶
func CreateSecretFromFiles ¶
func DeleteVeleroDs ¶
func EnsureClusterExists ¶
func ExecCommand ¶
func ExecCommandReadline ¶
func ExecuteCommand ¶
func GetAPIVersions ¶
func GetAPIVersions(client *TestClient, name string) ([]string, error)
func GetClusterCreateYaml ¶
func GetClusterVersion ¶
func GetFolders ¶
func GetPvcByPodName ¶
func KubectlConfigUseContext ¶
func KubectlGetInfo ¶
func ReadFileFromPodVolume ¶
func ReadLineLast ¶ added in v0.6.0
func RemoveElements ¶ added in v0.7.0
func StringSplit ¶ added in v0.6.0
func StringStrip ¶
func UploadToS3 ¶ added in v0.6.0
func WaitForCRDEstablished ¶
func WaitForPods ¶
WaitForPods waits till all pods arrive at PodRunning state
Types ¶
type TestClient ¶
type TestClient struct { Kubebuilder kbclient.Client ClientGo kubernetes.Interface // contains filtered or unexported fields }
TestClient defines the desired type of Client
func InitTestClient ¶
func InitTestClient(kubecontext string) (TestClient, error)
InitTestClient inits different type clients
func NewTestClient ¶
func NewTestClient(kubecontext string) (TestClient, error)
NewTestClient returns a set of ready-to-use API clients.
Click to show internal directories.
Click to hide internal directories.