testenv

package module
v0.0.0-...-35696f1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultEnvName  = "vmclarity-testenv"
	DefaultPlatform = types.EnvironmentTypeDocker
)
View Source
const (
	DefaultAPIServer         = "ghcr.io/openclarity/vmclarity-apiserver:latest"
	DefaultOrchestrator      = "ghcr.io/openclarity/vmclarity-orchestrator:latest"
	DefaultUI                = "ghcr.io/openclarity/vmclarity-ui:latest"
	DefaultUIBackend         = "ghcr.io/openclarity/vmclarity-ui-backend:latest"
	DefaultScanner           = "ghcr.io/openclarity/vmclarity-cli:latest"
	DefaultCRDiscoveryServer = "ghcr.io/openclarity/vmclarity-cr-discovery-server:latest"
)
View Source
const TestEnvDataDir = "vmclarity-testenv"

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

func New

func New(config *Config, opts ...ConfigOptFn) (types.Environment, error)

New returns an object implementing the types.Environment interface from Config.

Types

type Config

type Config struct {
	// Platform defines the platform to be used for running end-to-end test suite.
	Platform types.EnvironmentType `mapstructure:"platform"`
	// EnvName the name of the environment to be created.
	EnvName string `mapstructure:"env_name"`
	// Images provides a list of container images used for deployment.
	Images types.ContainerImages[string] `mapstructure:",squash"`
	// Docker contains the configuration for Docker platform.
	Docker *dockerenv.Config `mapstructure:"docker,omitempty"`
	// Kubernetes contains the configuration for Kubernetes platform.
	Kubernetes *k8senv.Config `mapstructure:"kubernetes,omitempty"`
	// AWS contains the configuration for AWS platform.
	AWS *awsenv.Config `mapstructure:"aws,omitempty"`
	// WorkDir contains the path to the work directory.
	WorkDir string `mapstructure:"work_dir"`
	// contains filtered or unexported fields
}

Config is the configuration for testenv.

type ConfigOptFn

type ConfigOptFn func(*Config) error

ConfigOptFn defines transformer function for Config.

func WithContext

func WithContext(ctx context.Context) ConfigOptFn

WithContext sets context for Config.

func WithLogger

func WithLogger(logger *logrus.Entry) ConfigOptFn

WithLogger sets logger for Config.

func WithWorkDir

func WithWorkDir(dir string) ConfigOptFn

WithWorkDir sets Config.WorkDir in config.

Directories

Path Synopsis
aws

Jump to

Keyboard shortcuts

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