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" DefaultPluginKics = "ghcr.io/openclarity/vmclarity-plugin-kics:latest" )
View Source
const TestEnvDataDir = "vmclarity-testenv"
Variables ¶
This section is empty.
Functions ¶
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"` // GCP contains the configuration for GCP platform. GCP *gcpenv.Config `mapstructure:"gcp,omitempty"` // Azure contains the configuration for Azure platform. Azure *azureenv.Config `mapstructure:"azure,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 ¶
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.
Click to show internal directories.
Click to hide internal directories.