Documentation ¶
Overview ¶
Package e2etestenv provides a test environment for end-to-end tests.
Index ¶
- func Setup(ctx context.Context, opts ...SetupOption) (client.Client, error)
- type SetupOption
- func WithCNPGImageName(name string) SetupOption
- func WithCNPGImageTag(tag string) SetupOption
- func WithCNPGKustomizationRef(ref string) SetupOption
- func WithCNPGKustomizationTimeout(timeout string) SetupOption
- func WithCNPGKustomizationURL(url string) SetupOption
- func WithCertManagerVersion(version string) SetupOption
- func WithIgnoreExistingResources(ignore bool) SetupOption
- func WithK8sVersion(version string) SetupOption
- func WithKindAdditionalNetworks(networks []string) SetupOption
- func WithKindVersion(version string) SetupOption
- type SetupOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SetupOption ¶
type SetupOption func(*SetupOptions)
SetupOption is a function that sets up an option for the test environment setup.
func WithCNPGImageName ¶
func WithCNPGImageName(name string) SetupOption
WithCNPGImageName sets the CloudNativePG image name for the test environment.
func WithCNPGImageTag ¶
func WithCNPGImageTag(tag string) SetupOption
WithCNPGImageTag sets the CloudNativePG image tag for the test environment.
func WithCNPGKustomizationRef ¶
func WithCNPGKustomizationRef(ref string) SetupOption
WithCNPGKustomizationRef sets the CloudNativePG kustomization ref for the test environment.
func WithCNPGKustomizationTimeout ¶
func WithCNPGKustomizationTimeout(timeout string) SetupOption
WithCNPGKustomizationTimeout sets the CloudNativePG kustomization timeout for the test environment.
func WithCNPGKustomizationURL ¶
func WithCNPGKustomizationURL(url string) SetupOption
WithCNPGKustomizationURL sets the CloudNativePG kustomization URL for the test environment.
func WithCertManagerVersion ¶
func WithCertManagerVersion(version string) SetupOption
WithCertManagerVersion sets the cert-manager version for the test environment.
func WithIgnoreExistingResources ¶
func WithIgnoreExistingResources(ignore bool) SetupOption
WithIgnoreExistingResources sets the option to ignore existing resources when creating the test environment, instead of returning an error.
func WithK8sVersion ¶
func WithK8sVersion(version string) SetupOption
WithK8sVersion sets the Kubernetes version for the test environment.
func WithKindAdditionalNetworks ¶
func WithKindAdditionalNetworks(networks []string) SetupOption
WithKindAdditionalNetworks sets the additional networks for the Kind cluster for the test environment.
func WithKindVersion ¶
func WithKindVersion(version string) SetupOption
WithKindVersion sets the Kind version for the test environment.
type SetupOptions ¶
type SetupOptions struct { K8sVersion string KindVersion string KindClusterNamePrefix string KindAdditionalNetworks []string CNPGKustomizationURL string CNPGKustomizationRef string CNPGKustomizationTimeout string CNPGImageName string CNPGImageTag string CertManagerVersion string IgnoreExistingResources bool }
SetupOptions contains the options for setting up the test environment.