tests

package
v0.0.0-...-a7d5eb0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SingleNodeLabel             = "SINGLE_NODE_ONLY"
	HighlyAvailableClusterLabel = "HIGHLY_AVAILABLE_CLUSTER"
	OpenshiftLabel              = "OpenShift"
)

labels

View Source
const (
	ConfigFileFlag = "config-file"
)

Variables

View Source
var KubeVirtStorageClassLocal string

Functions

func BeforeEach

func BeforeEach()

func FailIfHighAvailableCluster

func FailIfHighAvailableCluster(singleWorkerCluster bool)

func FailIfNotOpenShift

func FailIfNotOpenShift(cli kubecli.KubevirtClient, testName string)

func FailIfSingleNode

func FailIfSingleNode(singleWorkerCluster bool)

func FlagParse

func FlagParse()

func GetHCO

GetHCO reads the HCO CR from the APIServer with a DynamicClient

func GetJobTypeEnvVar

func GetJobTypeEnvVar() string

GetJobTypeEnvVar returns "JOB_TYPE" environment variable

func IsOpenShift

func IsOpenShift(cli kubecli.KubevirtClient) (bool, error)

func IsOpenShiftSingleStackIPv6

func IsOpenShiftSingleStackIPv6(cli kubecli.KubevirtClient) (bool, error)

func PatchHCO

func PatchHCO(ctx context.Context, cl kubecli.KubevirtClient, patch []byte) error

PatchHCO updates the HCO CR using a DynamicClient, it can return errors on failures

func RestoreDefaults

func RestoreDefaults(ctx context.Context, cli kubecli.KubevirtClient)

func UpdateHCO

UpdateHCO updates the HCO CR using a DynamicClient, it can return errors on failures

func UpdateHCORetry

UpdateHCORetry updates the HCO CR in a safe way internally calling UpdateHCO UpdateHCORetry internally uses an async Eventually block refreshing the in-memory object if needed and setting there Spec, Annotations, Finalizers and Labels from the input object. UpdateHCORetry should be preferred over UpdateHCO to reduce test flakiness due to inevitable concurrency conflicts

Types

type DashboardTestConfig

type DashboardTestConfig struct {
	TestItems []DashboardTestItem `yaml:"testItems,omitempty"`
}

type DashboardTestItem

type DashboardTestItem struct {
	Name      string `yaml:"name,omitempty"`
	Namespace string `yaml:"namespace,omitempty"`
	// keys expected in the configmap
	Keys []string `yaml:"keys,omitempty"`
}

type DataImportCronConfig

type DataImportCronConfig struct {
	ExpectedDataImportCrons []string            `yaml:"expectedDataImportCrons,omitempty"`
	ExpectedImageStream     []ImageStreamConfig `yaml:"expectedImageStream,omitempty"`
	Namespace               string              `yaml:"namespace,omitempty"`
}

type ImageStreamConfig

type ImageStreamConfig struct {
	Name         string   `yaml:"name"`
	RegistryName string   `yaml:"registryName"`
	UsageImages  []string `yaml:"usageImages,omitempty"`
}

type QuickStartTestConfig

type QuickStartTestConfig struct {
	TestItems []QuickStartTestItem `yaml:"testItems,omitempty"`
}

type QuickStartTestItem

type QuickStartTestItem struct {
	Name        string `yaml:"name,omitempty"`
	DisplayName string `yaml:"displayName,omitempty"`
}

type TestConfig

type TestConfig struct {
	QuickStart     QuickStartTestConfig `yaml:"quickStart,omitempty"`
	Dashboard      DashboardTestConfig  `yaml:"dashboard,omitempty"`
	DataImportCron DataImportCronConfig `yaml:"dataImportCron,omitempty"`
}

func GetConfig

func GetConfig() *TestConfig

Jump to

Keyboard shortcuts

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