testenv

package
v0.0.0-...-4a8d689 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: 32 Imported by: 0

Documentation

Overview

Package testenv is used to setup a e2e test environment/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CAPIOperatorDeployProvider

func CAPIOperatorDeployProvider(ctx context.Context, input CAPIOperatorDeployProviderInput)

func CleanupTestCluster

func CleanupTestCluster(ctx context.Context, input CleanupTestClusterInput)

func CollectArtifacts

func CollectArtifacts(ctx context.Context, kubeconfigPath, name string, args ...string) error

func CreateECRCreds

func CreateECRCreds(ctx context.Context, input CreateECRCredsInput)

func DeployChartMuseum

func DeployChartMuseum(ctx context.Context, input DeployChartMuseumInput)

func DeployRancher

func DeployRancher(ctx context.Context, input DeployRancherInput)

func DeployRancherTurtles

func DeployRancherTurtles(ctx context.Context, input DeployRancherTurtlesInput)

func NewEKSClusterProvider

func NewEKSClusterProvider(name, version, region string, numWorkers int) bootstrap.ClusterProvider

func RancherDeployIngress

func RancherDeployIngress(ctx context.Context, input RancherDeployIngressInput)

func RestartRancher

func RestartRancher(ctx context.Context, input RestartRancherInput)

func UninstallGitea

func UninstallGitea(ctx context.Context, input UninstallGiteaInput)

func UpgradeRancherTurtles

func UpgradeRancherTurtles(ctx context.Context, input UpgradeRancherTurtlesInput)

Types

type CAPIOperatorDeployProviderInput

type CAPIOperatorDeployProviderInput struct {
	E2EConfig                    *clusterctl.E2EConfig
	BootstrapClusterProxy        framework.ClusterProxy
	CAPIProvidersSecretsYAML     [][]byte
	CAPIProvidersYAML            []byte
	TemplateData                 map[string]string
	WaitDeploymentsReadyInterval []interface{}
	WaitForDeployments           []NamespaceName
}

type CleanupTestClusterInput

type CleanupTestClusterInput struct {
	SetupTestClusterResult
	SkipCleanup    bool
	ArtifactFolder string
}

type CreateECRCredsInput

type CreateECRCredsInput struct {
	BootstrapClusterProxy framework.ClusterProxy
	Name                  string
	Account               string
	Region                string
	Namespace             string
}

type CreateEKSBootstrapClusterAndValidateImagesInput

type CreateEKSBootstrapClusterAndValidateImagesInput struct {
	Name       string
	Version    string
	Region     string
	NumWorkers int
	Images     []clusterctl.ContainerImage
}

type CreateEKSBootstrapClusterAndValidateImagesInputResult

type CreateEKSBootstrapClusterAndValidateImagesInputResult struct {
	// BootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests.
	// Please note that provisioning will be skipped if e2e.use-existing-cluster is provided.
	BootstrapClusterProvider bootstrap.ClusterProvider
}

type DeployChartMuseumInput

type DeployChartMuseumInput struct {
	HelmBinaryPath        string
	BootstrapClusterProxy framework.ClusterProxy
	ChartsPath            string
	WaitInterval          []interface{}
}

type DeployGiteaInput

type DeployGiteaInput struct {
	BootstrapClusterProxy framework.ClusterProxy
	HelmBinaryPath        string
	ChartRepoName         string
	ChartRepoURL          string
	ChartName             string
	ChartVersion          string
	ValuesFilePath        string
	Values                map[string]string
	RolloutWaitInterval   []interface{}
	ServiceWaitInterval   []interface{}
	Username              string
	Password              string
	AuthSecretName        string
}

type DeployGiteaResult

type DeployGiteaResult struct {
	GitAddress string
}

func DeployGitea

func DeployGitea(ctx context.Context, input DeployGiteaInput) *DeployGiteaResult

type DeployRancherInput

type DeployRancherInput struct {
	BootstrapClusterProxy   framework.ClusterProxy
	HelmBinaryPath          string
	HelmExtraValuesPath     string
	InstallCertManager      bool
	CertManagerChartPath    string
	CertManagerUrl          string
	CertManagerRepoName     string
	RancherChartRepoName    string
	RancherChartURL         string
	RancherChartPath        string
	RancherVersion          string
	RancherImageTag         string
	RancherNamespace        string
	RancherHost             string
	RancherPassword         string
	RancherFeatures         string
	RancherPatches          [][]byte
	RancherWaitInterval     []interface{}
	ControllerWaitInterval  []interface{}
	RancherIngressConfig    []byte
	RancherServicePatch     []byte
	RancherIngressClassName string
	Development             bool
	Variables               turtlesframework.VariableCollection
}

type DeployRancherTurtlesInput

type DeployRancherTurtlesInput struct {
	BootstrapClusterProxy        framework.ClusterProxy
	HelmBinaryPath               string
	ChartPath                    string
	CAPIProvidersSecretYAML      []byte
	CAPIProvidersYAML            []byte
	Namespace                    string
	Image                        string
	Tag                          string
	Version                      string
	WaitDeploymentsReadyInterval []interface{}
	AdditionalValues             map[string]string
}

type EKSClusterProvider

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

func (*EKSClusterProvider) Create

func (k *EKSClusterProvider) Create(ctx context.Context)

Create a EKS cluster.

func (*EKSClusterProvider) Dispose

func (k *EKSClusterProvider) Dispose(ctx context.Context)

Dispose the EKS cluster and its kubeconfig file.

func (*EKSClusterProvider) GetKubeconfigPath

func (k *EKSClusterProvider) GetKubeconfigPath() string

GetKubeconfigPath returns the path to the kubeconfig file for the cluster.

type NamespaceName

type NamespaceName struct {
	Name      string
	Namespace string
}

type RancherDeployIngressInput

type RancherDeployIngressInput struct {
	BootstrapClusterProxy    framework.ClusterProxy
	HelmBinaryPath           string
	HelmExtraValuesPath      string
	IsolatedMode             bool
	NginxIngress             []byte
	NginxIngressNamespace    string
	IngressWaitInterval      []interface{}
	NgrokApiKey              string
	NgrokAuthToken           string
	NgrokPath                string
	NgrokRepoName            string
	NgrokRepoURL             string
	DefaultIngressClassPatch []byte
	UseEKS                   bool
}

type RestartRancherInput

type RestartRancherInput struct {
	BootstrapClusterProxy framework.ClusterProxy
	RancherNamespace      string
	RancherWaitInterval   []interface{}
}

type SetupTestClusterInput

type SetupTestClusterInput struct {
	UseExistingCluster   bool
	UseEKS               bool
	E2EConfig            *clusterctl.E2EConfig
	ClusterctlConfigPath string
	Scheme               *runtime.Scheme
	ArtifactFolder       string
	// Hostname             string
	KubernetesVersion string
	IsolatedMode      bool
	HelmBinaryPath    string
}

type SetupTestClusterResult

type SetupTestClusterResult struct {
	// BootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests.
	// Please note that provisioning will be skipped if e2e.use-existing-cluster is provided.
	BootstrapClusterProvider bootstrap.ClusterProvider

	// BootstrapClusterProxy allows to interact with the bootstrap cluster to be used for the e2e tests.
	BootstrapClusterProxy framework.ClusterProxy

	// BootstrapClusterLogFolder is the log folder for the cluster
	BootstrapClusterLogFolder string

	// IsolatedHostName is the hostname to use for Rancher in isolated mode
	IsolatedHostName string
}

type UninstallGiteaInput

type UninstallGiteaInput struct {
	BootstrapClusterProxy framework.ClusterProxy
	HelmBinaryPath        string
	DeleteWaitInterval    []interface{}
}

type UpgradeRancherTurtlesInput

type UpgradeRancherTurtlesInput struct {
	BootstrapClusterProxy        framework.ClusterProxy
	HelmBinaryPath               string
	Namespace                    string
	WaitDeploymentsReadyInterval []interface{}
	AdditionalValues             map[string]string
	Image                        string
	Tag                          string
}

type WaitForServiceIngressHostnameInput

type WaitForServiceIngressHostnameInput struct {
	BootstrapClusterProxy framework.ClusterProxy
	ServiceName           string
	ServiceNamespace      string
	IngressWaitInterval   []interface{}
}

type WaitForServiceIngressHostnameResult

type WaitForServiceIngressHostnameResult struct {
	Hostname string
}

Jump to

Keyboard shortcuts

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