Documentation ¶
Index ¶
- func RunTestCase(test VeleroBackupRestoreTest) error
- func TestFunc(test VeleroBackupRestoreTest) func()
- type TestCase
- func (t *TestCase) Backup() error
- func (t *TestCase) Clean() error
- func (t *TestCase) CreateResources() error
- func (t *TestCase) Destroy() error
- func (t *TestCase) GenerateUUID() string
- func (t *TestCase) GetTestCase() *TestCase
- func (t *TestCase) GetTestMsg() *TestMSG
- func (t *TestCase) Init() error
- func (t *TestCase) MonitorMetircs(ctx context.Context, collectors *metrics.MetricsCollector)
- func (t *TestCase) Restore() error
- func (t *TestCase) Verify() error
- type TestMSG
- type VeleroBackupRestoreTest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTestCase ¶
func RunTestCase(test VeleroBackupRestoreTest) error
func TestFunc ¶
func TestFunc(test VeleroBackupRestoreTest) func()
Types ¶
type TestCase ¶
type TestCase struct { BackupName string RestoreName string CaseBaseName string BackupArgs []string RestoreArgs []string NamespacesTotal int TestMsg *TestMSG Client TestClient NSIncluded *[]string NSExcluded *[]string UseVolumeSnapshots bool RestorePhaseExpect velerov1api.RestorePhase Ctx context.Context CtxCancel context.CancelFunc UUIDgen string // contains filtered or unexported fields }
func (*TestCase) CreateResources ¶
func (*TestCase) GenerateUUID ¶
func (*TestCase) GetTestCase ¶
func (*TestCase) GetTestMsg ¶
func (*TestCase) MonitorMetircs ¶
func (t *TestCase) MonitorMetircs(ctx context.Context, collectors *metrics.MetricsCollector)
type VeleroBackupRestoreTest ¶
type VeleroBackupRestoreTest interface { Init() error CreateResources() error Backup() error Destroy() error Restore() error Verify() error Clean() error GetTestMsg() *TestMSG GetTestCase() *TestCase }
The VeleroBackupRestoreTest interface is just could be suit for the cases that follow the test flow of create resources, backup, delete test resource, restore and verify. And the cases have similar execute function and similar data. it's both fine for you to use it or not which depends on your test patterns.
Click to show internal directories.
Click to hide internal directories.