Documentation
¶
Index ¶
- Constants
- func CommonE2ETestDecorators() []interface{}
- func DecoratorsFromEnv(decorators ...interface{}) []interface{}
- func FailureBehaviourEnvSwitcherDecorator() []interface{}
- func GetConfig() *config.Config
- func SIG(identifier, text string, args ...interface{}) (extendedText string, newArgs []interface{})
- func SIGDescribe(identifier, text string, args ...interface{}) bool
- func SetConfig(c *config.Config)
- func WithSSHPrivateKey(privateKey string) func(o *sshCommandOptions)
- func WithSSHTimeout(timeout time.Duration) func(o *sshCommandOptions)
- func WithSSHUser(user string) func(o *sshCommandOptions)
- type Clients
- func (c Clients) D8Virtualization() d8.D8Virtualization
- func (c Clients) DynamicClient() dynamic.Interface
- func (c Clients) GenericClient() client.Client
- func (c Clients) Git() gt.Git
- func (c Clients) KubeClient() kubernetes.Interface
- func (c Clients) Kubectl() kubectl.Kubectl
- func (c Clients) VirtClient() kubeclient.Client
- type Dvcr
- type EnvSwitchable
- type FailureBehaviourEnvSwitcher
- type Framework
- func (f *Framework) After()
- func (f *Framework) AfterAll()
- func (f *Framework) AfterEach()
- func (f *Framework) BatchCreate(ctx context.Context, objs ...client.Object) error
- func (f *Framework) Before()
- func (f *Framework) BeforeAll()
- func (f *Framework) BeforeEach()
- func (f *Framework) CreateNamespace(prefix string, labels map[string]string) (*corev1.Namespace, error)
- func (f *Framework) DeferDelete(objs ...client.Object)
- func (f *Framework) DeferNamespaceDelete(name string)
- func (f *Framework) GetModuleConfig(name string) (*dv1alpha1.ModuleConfig, error)
- func (f *Framework) GetNamePrefix(storageClass *storagev1.StorageClass) (string, error)
- func (f *Framework) GetVirtualizationModuleConfig() (*VirtualizationModuleConfig, error)
- func (f *Framework) Namespace() *corev1.Namespace
- func (f *Framework) SSHCommand(vmName, vmNamespace, command string, options ...SSHCommandOption) error
- type SSHCommandOption
- type Storage
- type VirtualizationModuleConfig
- type VirtualizationModuleConfigSettings
- type VirtualizationModuleConfigSpec
Constants ¶
View Source
const ( NamespaceBasePrefix = "virtualization-e2e" NamespaceLabel = "virtualization-e2e" )
View Source
const ( ShortTimeout = 30 * time.Second MiddleTimeout = 60 * time.Second LongTimeout = 300 * time.Second MaxTimeout = 600 * time.Second )
View Source
const ContinueOnFailureEnv = "CONTINUE_ON_FAILURE"
Variables ¶
This section is empty.
Functions ¶
func CommonE2ETestDecorators ¶
func CommonE2ETestDecorators() []interface{}
CommonE2ETestDecorators returns common decorators for e2e tests: Ordered and ContinueOnFailure switchable with env.
func DecoratorsFromEnv ¶
func DecoratorsFromEnv(decorators ...interface{}) []interface{}
func FailureBehaviourEnvSwitcherDecorator ¶
func FailureBehaviourEnvSwitcherDecorator() []interface{}
func SIGDescribe ¶
func SetConfig ¶
SetConfig sets the config. this needs because we have some legacy, config mutating in the main test suite should be refactored in the future
func WithSSHPrivateKey ¶
func WithSSHPrivateKey(privateKey string) func(o *sshCommandOptions)
func WithSSHTimeout ¶
func WithSSHUser ¶
func WithSSHUser(user string) func(o *sshCommandOptions)
Types ¶
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
func GetClients ¶
func GetClients() Clients
func (Clients) D8Virtualization ¶
func (c Clients) D8Virtualization() d8.D8Virtualization
func (Clients) DynamicClient ¶
func (Clients) GenericClient ¶
func (Clients) KubeClient ¶
func (c Clients) KubeClient() kubernetes.Interface
func (Clients) VirtClient ¶
func (c Clients) VirtClient() kubeclient.Client
type EnvSwitchable ¶
type EnvSwitchable interface {
Decorator() interface{}
}
type FailureBehaviourEnvSwitcher ¶
type FailureBehaviourEnvSwitcher struct{}
func (FailureBehaviourEnvSwitcher) Decorator ¶
func (f FailureBehaviourEnvSwitcher) Decorator() interface{}
func (FailureBehaviourEnvSwitcher) IsContinueOnFailure ¶
func (f FailureBehaviourEnvSwitcher) IsContinueOnFailure() bool
IsContinueOnFailure returns true if Continue on error is enabled.
type Framework ¶
type Framework struct {
Clients
// contains filtered or unexported fields
}
func NewFramework ¶
func (*Framework) BatchCreate ¶
func (*Framework) BeforeEach ¶
func (f *Framework) BeforeEach()
func (*Framework) CreateNamespace ¶
func (*Framework) DeferDelete ¶
func (*Framework) DeferNamespaceDelete ¶
func (*Framework) GetModuleConfig ¶
func (f *Framework) GetModuleConfig(name string) (*dv1alpha1.ModuleConfig, error)
func (*Framework) GetNamePrefix ¶
func (f *Framework) GetNamePrefix(storageClass *storagev1.StorageClass) (string, error)
func (*Framework) GetVirtualizationModuleConfig ¶
func (f *Framework) GetVirtualizationModuleConfig() (*VirtualizationModuleConfig, error)
func (*Framework) SSHCommand ¶
func (f *Framework) SSHCommand(vmName, vmNamespace, command string, options ...SSHCommandOption) error
type SSHCommandOption ¶
type SSHCommandOption func(o *sshCommandOptions)
type VirtualizationModuleConfig ¶
type VirtualizationModuleConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec VirtualizationModuleConfigSpec `json:"spec"`
}
type VirtualizationModuleConfigSpec ¶
type VirtualizationModuleConfigSpec struct {
Enabled bool `json:"enabled"`
Settings VirtualizationModuleConfigSettings `json:"settings"`
Version int `json:"version"`
}
Click to show internal directories.
Click to hide internal directories.