framework

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BRType     = "br"
	DumperType = "dumper"
)

Variables

This section is empty.

Functions

func GetAndCheckBackup

func GetAndCheckBackup(c client.Client, ns, name string, check func(b *v1alpha1.Backup) bool) error

func GetBackup

func GetBackup(ns, name, tcName string, s3Config *v1alpha1.S3StorageProvider) *v1alpha1.Backup

GetBackup return a basic backup

func GetCompactBackup

func GetCompactBackup(ns, name, tcName string, s3Config *v1alpha1.S3StorageProvider) *v1alpha1.CompactBackup

func GetRestore

func GetRestore(ns, name, tcName string, s3Config *v1alpha1.S3StorageProvider) *v1alpha1.Restore

func GetRole

func GetRole(ns string) *rbacv1.Role

GetRole returns a role for br test.

func GetRoleBinding

func GetRoleBinding(ns string) *rbacv1.RoleBinding

GetRoleBinding returns a rolebinding for br test.

func GetSecret

func GetSecret(ns, name, password string) *corev1.Secret

GetSecret returns a secret to visit tidb.

func GetServiceAccount

func GetServiceAccount(ns string) *corev1.ServiceAccount

GetServiceAccount returns a sa for br test.

func LoadClientRawConfig

func LoadClientRawConfig() (clientcmdapi.Config, error)

func WaitAndDeleteRunningBackupPod

func WaitAndDeleteRunningBackupPod(f *Framework, backup *v1alpha1.Backup, timeout time.Duration) error

func WaitBackupPodOnPhase

func WaitBackupPodOnPhase(f *Framework, backup *v1alpha1.Backup, phase corev1.PodPhase, timeout time.Duration) error

func WaitForBackup

func WaitForBackup(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackup will poll and wait until timeout

func WaitForBackupComplete

func WaitForBackupComplete(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackupComplete will poll and wait until timeout or backup complete condition is true

func WaitForBackupDeleted

func WaitForBackupDeleted(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackupDeleted will poll and wait until timeout or backup is really deleted

func WaitForBackupFailed

func WaitForBackupFailed(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackupFailed will poll and wait until timeout or backup failed condition is true

func WaitForBackupOnRunning

func WaitForBackupOnRunning(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackupOnRunning will poll and wait until timeout or backup phause is running

func WaitForBackupOnScheduled

func WaitForBackupOnScheduled(c client.Client, ns, name string, timeout time.Duration) error

WaitForBackupOnRunning will poll and wait until timeout or backup phause is schedule

func WaitForLogBackupProgressReachTS

func WaitForLogBackupProgressReachTS(c client.Client, ns, name, expect string, timeout time.Duration) error

WaitForLogBackupProgressReachTS will poll and wait until timeout or log backup tracker has update checkpoint ts to expect

func WaitForLogBackupReachTS

func WaitForLogBackupReachTS(name, pdhost, expect string, timeout time.Duration) error

WaitForLogBackupReachTS will poll and wait until timeout or log backup reach expect ts

func WaitForRestoreComplete

func WaitForRestoreComplete(c client.Client, ns, name string, timeout time.Duration) error

WaitForRestoreComplete will poll and wait until timeout or restore complete condition is true

func WaitForRestoreDeleted

func WaitForRestoreDeleted(c client.Client, ns, name string, timeout time.Duration) error

WaitForRestoreDeleted will poll and wait until timeout or restore is really deleted

func WaitForRestoreProgressDone

func WaitForRestoreProgressDone(c client.Client, ns, name string, timeout time.Duration) error

WaitForRestoreProgressDone will poll and wait until timeout or restore progress has update to 100

Types

type Framework

type Framework struct {
	*framework.Framework

	// PortForwarder is defined to visit pod in local.
	PortForwarder k8s.PortForwarder

	// Storage defines interface of s3 storage
	Storage s3.Interface

	YamlApplier *k8s.YAMLApplier
}

func NewFramework

func NewFramework(baseName string) *Framework

Jump to

Keyboard shortcuts

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