Documentation
¶
Index ¶
- type Backend
- func (Backend) Cleanup(ctx types.Context) error
- func (Backend) Deploy(ctx types.TestContext) error
- func (Backend) Failover(ctx types.TestContext) error
- func (b Backend) Gather(ctx types.Context, clusters []*types.Cluster, options gathering.Options) <-chan gathering.Result
- func (b Backend) GatherS3(ctx types.Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
- func (Backend) Protect(ctx types.TestContext) error
- func (Backend) Purge(ctx types.TestContext) error
- func (Backend) Relocate(ctx types.TestContext) error
- func (Backend) Setup(ctx types.Context) error
- func (Backend) Undeploy(ctx types.TestContext) error
- func (Backend) Unprotect(ctx types.TestContext) error
- func (Backend) Validate(ctx types.Context) error
- type ContextFunc
- type Mock
- func (m *Mock) Cleanup(ctx types.Context) error
- func (m *Mock) Deploy(ctx types.TestContext) error
- func (m *Mock) Failover(ctx types.TestContext) error
- func (m *Mock) Gather(ctx types.Context, clusters []*types.Cluster, options gathering.Options) <-chan gathering.Result
- func (m *Mock) GatherS3(ctx types.Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
- func (m *Mock) Protect(ctx types.TestContext) error
- func (m *Mock) Purge(ctx types.TestContext) error
- func (m *Mock) Relocate(ctx types.TestContext) error
- func (m *Mock) Setup(ctx types.Context) error
- func (m *Mock) Undeploy(ctx types.TestContext) error
- func (m *Mock) Unprotect(ctx types.TestContext) error
- func (m *Mock) Validate(ctx types.Context) error
- type TestContextFunc
- type Testing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct{}
type ContextFunc ¶
type Mock ¶
type Mock struct {
// Operations on types.Context
ValidateFunc ContextFunc
SetupFunc ContextFunc
CleanupFunc ContextFunc
// Operations on types.TestContext
DeployFunc TestContextFunc
UndeployFunc TestContextFunc
ProtectFunc TestContextFunc
UnprotectFunc TestContextFunc
FailoverFunc TestContextFunc
RelocateFunc TestContextFunc
PurgeFunc TestContextFunc
// Handling failures.
GatherFunc func(ctx types.Context, clsuters []*types.Cluster, options gathering.Options) <-chan gathering.Result
GatherS3Func func(ctx types.Context, profiles []*s3.Profile, prefixes []string, outputDir string) <-chan s3.Result
}
Mock implements the testing.Testing interface. All operations succeed without accessing the clusters. To cause operations to fail, set a function returning an error.
type TestContextFunc ¶
type TestContextFunc func(types.TestContext) error
type Testing ¶
type Testing interface {
// Operations on types.Context.
Validate(types.Context) error
Setup(types.Context) error
Cleanup(types.Context) error
// Operations on types.TestContext.
Deploy(types.TestContext) error
Undeploy(types.TestContext) error
Protect(types.TestContext) error
Unprotect(types.TestContext) error
Failover(types.TestContext) error
Relocate(types.TestContext) error
Purge(types.TestContext) error
// Handling failures.
Gather(
ctx types.Context,
clusters []*types.Cluster,
options gathering.Options,
) <-chan gathering.Result
GatherS3(
ctx types.Context,
profiles []*s3.Profile,
prefixes []string,
outputDir string,
) <-chan s3.Result
}
Testing interface for ramenctl commands.
Click to show internal directories.
Click to hide internal directories.