test

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidateStep = "validate"
	SetupStep    = "setup"
	TestsStep    = "tests"
	CleanupStep  = "cleanup"
)
View Source
const (
	Passed   = report.SummaryKey("passed")
	Failed   = report.SummaryKey("failed")
	Skipped  = report.SummaryKey("skipped")
	Canceled = report.SummaryKey("canceled")
)

Summary keys for test reports.

Variables

This section is empty.

Functions

func Clean

func Clean(configFile string, outputDir string) error

func Run

func Run(configFile string, outputDir string) error

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

Command is a ramenctl test command.

func (*Command) Clean added in v0.5.0

func (c *Command) Clean() error

Clean up after running a test flow and return an if cleaning one or more tests failed.

func (*Command) Config added in v0.8.0

func (c *Command) Config() *e2econfig.Config

func (*Command) Context added in v0.8.0

func (c *Command) Context() context.Context

func (*Command) Env added in v0.8.0

func (c *Command) Env() *types.Env

func (*Command) Logger added in v0.8.0

func (c *Command) Logger() *zap.SugaredLogger

func (*Command) Run added in v0.5.0

func (c *Command) Run() error

Run a test flow and return an error if one or more tests failed. When completed you need to call Clean() to remove resources created during the run.

type Context

type Context struct {
	// contains filtered or unexported fields
}

Context implements types.TestContext interface.

func (*Context) AppNamespace

func (c *Context) AppNamespace() string

func (*Context) Config

func (c *Context) Config() *e2econfig.Config

func (*Context) Context added in v0.5.0

func (c *Context) Context() context.Context

func (*Context) Deployer

func (c *Context) Deployer() types.Deployer

func (*Context) Env

func (c *Context) Env() *types.Env

func (*Context) Logger

func (c *Context) Logger() *zap.SugaredLogger

func (*Context) ManagementNamespace

func (c *Context) ManagementNamespace() string

func (*Context) Name

func (c *Context) Name() string

func (Context) WithTimeout added in v0.6.0

func (c Context) WithTimeout(d stdtime.Duration) (*Context, context.CancelFunc)

WithTimeout returns a derived context with a deadline. Call cancel to release resources associated with the context as soon as the operation running in the context complete.

func (*Context) Workload

func (c *Context) Workload() types.Workload

type Report added in v0.1.1

type Report struct {
	*report.Base
	Config *e2econfig.Config `json:"config"`
}

Report created by test sub commands.

func (*Report) AddStep added in v0.3.0

func (r *Report) AddStep(step *report.Step)

AddStep adds a step to the report.

func (*Report) Equal added in v0.4.0

func (r *Report) Equal(o *Report) bool

Equal return true if report is equal to other report.

type Test

type Test struct {
	*Context
	Backend  testing.Testing
	Status   report.Status
	Steps    []*report.Step
	Duration float64
	// contains filtered or unexported fields
}

Test perform DR opetaions for testing DR flow.

func (*Test) Deploy

func (t *Test) Deploy() bool

func (*Test) Failover

func (t *Test) Failover() bool

func (*Test) Protect

func (t *Test) Protect() bool

func (*Test) Purge added in v0.9.0

func (t *Test) Purge() bool

func (*Test) Relocate

func (t *Test) Relocate() bool

func (*Test) Undeploy

func (t *Test) Undeploy() bool

func (*Test) Unprotect

func (t *Test) Unprotect() bool

Jump to

Keyboard shortcuts

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