testhelpers

package
v0.0.0-...-a4e6051 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFile

func ApplyFile(ctx context.Context, k8s client.Client, filepath string) (result []string, err error)

ApplyFile applies a yaml on k8s client

func CreateKubernetesCluster

func CreateKubernetesCluster(ctx context.Context, t *testing.T) (*k3s.K3sContainer, error)

func CreateSecretForTraefikHub

func CreateSecretForTraefikHub(ctx context.Context, t *testing.T, k8s client.Client)

func Delete

func Delete(ctx context.Context, k8s client.Client, kind, name, ns, group, version string) error

func InstallTraefikHubAPIGW

func InstallTraefikHubAPIGW(ctx context.Context, t *testing.T, k8s client.Client) (string, error)

InstallTraefikHubAPIGW install Traefik Hub with Helm and return LB IP

func InstallTraefikHubAPIM

func InstallTraefikHubAPIM(ctx context.Context, t *testing.T, k8s client.Client) (string, error)

InstallTraefikHubAPIM install Traefik Hub API Management with Helm and return LB IP

func InstallTraefikProxy

func InstallTraefikProxy(ctx context.Context, t *testing.T, k8s client.Client) (string, error)

InstallTraefikProxy install Traefik Proxy with Helm and return LB IP

func LaunchHelmCommand

func LaunchHelmCommand(t *testing.T, arg ...string)

LaunchHelmCommand execute `helm` CLI with arg and display stdout+stder with testcontainer logger

func LaunchKubectl

func LaunchKubectl(t *testing.T, arg ...string) *bytes.Buffer

LaunchKubectl execute `kubectl` CLI with arg and return stdout+stderr in a single string

func WaitForJobCompleted

func WaitForJobCompleted(ctx context.Context, t *testing.T, k8s client.Client, interval time.Duration, labelSelector string) error

func WaitForPodReady

func WaitForPodReady(ctx context.Context, t *testing.T, k8s client.Client, interval time.Duration, labelSelector string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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