Documentation
¶
Overview ¶
Package helpers implements several helpers for testing.
Index ¶
- func CPUInfo() string
- func HTTPHealthCheck(addr, cert string) func() error
- func HTTPHealthCheckWithAuth(addr, cert, username, password string) func() error
- func HealthCheck(addr string, connTimeout time.Duration, rpcTimeout time.Duration, ...) func() error
- func HealthCheckWithAuth(addr string, connTimeout time.Duration, rpcTimeout time.Duration, ...) func() error
- func ListKeys(serverAddress string, prefix string) (map[string]*databasev1.Node, error)
- func MemoryInfo() string
- func OSInfo() string
- func PrintDiskUsage(dir string, maxDepth, curDepth int)
- func TimeRange(args Args, shardContext SharedContext) *modelv1.TimeRange
- func UnmarshalYAML(ii []byte, m proto.Message)
- type Args
- type BackupSharedContext
- type LifecycleSharedContext
- type SharedContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CPUInfo ¶ added in v0.6.0
func CPUInfo() string
CPUInfo returns the CPU information of the current machine.
func HTTPHealthCheck ¶ added in v0.2.0
HTTPHealthCheck returns a function for ginkgo "Eventually" poll it repeatedly to check whether a HTTP server is ready.
func HTTPHealthCheckWithAuth ¶ added in v0.9.0
HTTPHealthCheckWithAuth returns a function for ginkgo "Eventually" poll it repeatedly to check whether a HTTP server is ready with Auth.
func HealthCheck ¶
func HealthCheck(addr string, connTimeout time.Duration, rpcTimeout time.Duration, opts ...grpc.DialOption) func() error
HealthCheck returns a function for ginkgo "Eventually" poll it repeatedly to check whether a gRPC server is ready.
func HealthCheckWithAuth ¶ added in v0.9.0
func HealthCheckWithAuth(addr string, connTimeout time.Duration, rpcTimeout time.Duration, username, password string, opts ...grpc.DialOption) func() error
HealthCheckWithAuth returns a function for ginkgo "Eventually" poll it repeatedly to check whether a gRPC server is ready with Auth.
func MemoryInfo ¶ added in v0.6.0
func MemoryInfo() string
MemoryInfo returns the memory information of the current machine.
func OSInfo ¶ added in v0.6.0
func OSInfo() string
OSInfo returns the OS information of the current machine.
func PrintDiskUsage ¶ added in v0.6.0
PrintDiskUsage prints the disk usage of the specified directory and its subdirectories.
func TimeRange ¶ added in v0.2.0
func TimeRange(args Args, shardContext SharedContext) *modelv1.TimeRange
TimeRange returns a modelv1.TimeRange based on Args and SharedContext.
func UnmarshalYAML ¶ added in v0.2.0
UnmarshalYAML decodes YAML raw bytes to proto.Message.
Types ¶
type Args ¶ added in v0.2.0
type Args struct {
Begin *timestamppb.Timestamp
End *timestamppb.Timestamp
Input string
Want string
Stages []string
Offset time.Duration
Duration time.Duration
WantEmpty bool
WantErr bool
DisOrder bool
IgnoreElementID bool
}
Args is a wrapper seals all necessary info for table specs.
type BackupSharedContext ¶ added in v0.8.0
type BackupSharedContext struct {
}
BackupSharedContext is the context shared between test cases in the snapshot testing.
type LifecycleSharedContext ¶ added in v0.8.0
type LifecycleSharedContext struct {
}
LifecycleSharedContext is the context shared between test cases in the lifecycle testing.
type SharedContext ¶ added in v0.2.0
type SharedContext struct {
}
SharedContext is the context shared between test cases in the integration testing.