Documentation ¶
Overview ¶
Package utils is a package that contains utility functions for the e2e tests.
Index ¶
- func ApplyWithSshuttle(t *testing.T, terraformOptions *terraform.Options) error
- func ConfigureKubeconfig(t *testing.T, tempFolder string)
- func DestroyWithSshuttle(t *testing.T, terraformOptions *terraform.Options) error
- func DoLog(args ...interface{})
- func DownloadZarfInitPackage(t *testing.T)
- func GenerateRandomHex(n int) string
- func GetEKSCluster(t *testing.T, tempFolder string) (*eks.Cluster, error)
- func NewK8sClientset(cluster *eks.Cluster) (*kubernetes.Clientset, error)
- func RunSshuttleInBackground(t *testing.T, tempFolder string) (*exec.Cmd, error)
- func SetDefaultEnvVar(key, defaultValue string)
- func StopSshuttle(t *testing.T, cmd *exec.Cmd) error
- func ValidateEFSFunctionality(t *testing.T, tempFolder string)
- func ValidateZarfInit(t *testing.T, tempFolder string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyWithSshuttle ¶
ApplyWithSshuttle runs terraform apply with sshuttle running in the background.
func ConfigureKubeconfig ¶
ConfigureKubeconfig idempotently uses the AWS CLI to configure the user's kubeconfig file with the new EKS cluster.
func DestroyWithSshuttle ¶
DestroyWithSshuttle runs terraform destroy with sshuttle running in the background.
func DoLog ¶
func DoLog(args ...interface{})
DoLog logs the given arguments to the given writer, along with a timestamp.
func DownloadZarfInitPackage ¶
DownloadZarfInitPackage idempotently downloads the Zarf init package if it doesn't already exist.
func GenerateRandomHex ¶
func GetEKSCluster ¶
GetEKSCluster returns the EKS cluster for the given terraform folder.
func NewK8sClientset ¶
func NewK8sClientset(cluster *eks.Cluster) (*kubernetes.Clientset, error)
NewK8sClientset returns a new kubernetes clientset for the given cluster.
func RunSshuttleInBackground ¶
RunSshuttleInBackground runs sshuttle in the background.
func SetDefaultEnvVar ¶
func SetDefaultEnvVar(key, defaultValue string)
Helper function to set default environment variable if it's not already set.
func StopSshuttle ¶
StopSshuttle stops sshuttle.
func ValidateEFSFunctionality ¶
ValidateEFSFunctionality idempotently validates that EFS functionality is working.
func ValidateZarfInit ¶
ValidateZarfInit idempotently ensures that zarf init runs successfully.
Types ¶
This section is empty.