test

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

func NewContext

func NewContext(
	parent types.Context,
	name string,
	w types.Workload,
	d types.Deployer,
) Context

func (*Context) AppNamespace

func (c *Context) AppNamespace() string

func (*Context) Config

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

func (*Context) Context

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

func (*Context) Deploy

func (c *Context) Deploy(dt *testing.T)

func (*Context) Deployer

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

func (*Context) Disable

func (c *Context) Disable(dt *testing.T)

func (*Context) Enable

func (c *Context) Enable(dt *testing.T)

func (*Context) Env

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

func (*Context) Failover

func (c *Context) Failover(dt *testing.T)

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) Relocate

func (c *Context) Relocate(dt *testing.T)

func (*Context) Undeploy

func (c *Context) Undeploy(dt *testing.T)

func (*Context) Validate

func (c *Context) Validate() error

Validated return an error if the combination of deployer and workload is not supported. TODO: validate that the deployer/workload is compatible with the clusters.

func (Context) WithTimeout

func (c Context) WithTimeout(d time.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 T

type T struct {
	*testing.T
	// contains filtered or unexported fields
}

T extends testing.T to use a custom logger.

func WithLog

func WithLog(t *testing.T, log *zap.SugaredLogger) *T

WithLog returns a t wrapped with a specified log.

func (*T) Error

func (t *T) Error(msg string)

Error writes an error message to the log and mark the test as failed.

func (*T) Errorf

func (t *T) Errorf(format string, args ...any)

Errorf writes a formatted error message to the log and markd the test as failed.

func (*T) Fatal

func (t *T) Fatal(msg string)

Fatal writes an error message to the log and fail the text immediately.

func (*T) Fatalf

func (t *T) Fatalf(format string, args ...any)

Fatalf writes a formatted error message to the log and fail the text immediately.

func (*T) Log

func (t *T) Log(msg string)

Log writes a message to the log.

func (*T) Logf

func (t *T) Logf(format string, args ...any)

Log writes a formatted message to the log.

func (*T) Skip

func (t *T) Skip(msg string)

Skip is equivalent to Log followed by SkipNow.

func (*T) Skipf

func (t *T) Skipf(format string, args ...any)

Skipf is equivalent to Logf followed by SkipNow.

Jump to

Keyboard shortcuts

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