testutils

package
v1.4.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructRestoreMetaStr added in v1.4.0

func ConstructRestoreMetaStr() string

func GenValidStorageProviders

func GenValidStorageProviders() []v1alpha1.StorageProvider

GenValidStorageProviders generates valid storage providers

Types

type Helper

type Helper struct {
	T    *testing.T
	Deps *controller.Dependencies
	// contains filtered or unexported fields
}

Helper is for testing backup related code only

func NewHelper

func NewHelper(t *testing.T) *Helper

NewHelper returns a helper encapsulation

func (*Helper) Close

func (h *Helper) Close()

Close closes the stop channel

func (*Helper) CreateRestore added in v1.4.0

func (h *Helper) CreateRestore(restore *v1alpha1.Restore)

func (*Helper) CreateSecret

func (h *Helper) CreateSecret(obj interface{})

CreateSecret creates secrets based on backup/restore spec

func (*Helper) CreateTC

func (h *Helper) CreateTC(namespace, clusterName string)

CreateTC creates a TidbCluster with name `clusterName` in ns `namespace`

func (*Helper) JobExists

func (h *Helper) JobExists(restore *v1alpha1.Restore)

JobExists checks whether a k8s Job exists

Jump to

Keyboard shortcuts

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